diff options
| author | Guenter Roeck <[email protected]> | 2021-05-10 22:48:49 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2021-05-12 08:44:21 +0000 |
| commit | 440e906702410f59ae5397ec9e3b639edb53f80e (patch) | |
| tree | 4ac4ab43f46568c574c59d4fca636819457d1153 /drivers/platform/surface/aggregator/controller.c | |
| parent | Merge tag 'for-5.13-rc1-part2-tag' of git://git.kernel.org/pub/scm/linux/kern... (diff) | |
| download | kernel-440e906702410f59ae5397ec9e3b639edb53f80e.tar.gz kernel-440e906702410f59ae5397ec9e3b639edb53f80e.zip | |
perf/x86/intel/uncore: Drop unnecessary NULL checks after container_of()
The parameter passed to the pmu_enable() and pmu_disable() functions can not be
NULL because it is dereferenced by the caller.
That means the result of container_of() on that parameter can also never be NULL.
The existing NULL checks are therefore unnecessary and misleading. Remove them.
This change was made automatically with the following Coccinelle script.
@@
type t;
identifier v;
statement s;
@@
<+...
(
t v = container_of(...);
|
v = container_of(...);
)
...
when != v
- if (\( !v \| v == NULL \) ) s
...+>
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/platform/surface/aggregator/controller.c')
0 files changed, 0 insertions, 0 deletions
