mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
![]() The result of container_of() operations is never NULL unless the embedded element is the first element of the structure. This is not the case here. The NULL check on the result of container_of() is therefore unnecessary and misleading. Remove it. 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 ...+> While at it, remove unused but assigned variable hpd in dp_display_usbpd_attention_cb(). Signed-off-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210525032033.453143-1-linux@roeck-us.net Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Rob Clark <robdclark@chromium.org> |
||
---|---|---|
.. | ||
dp_audio.c | ||
dp_audio.h | ||
dp_aux.c | ||
dp_aux.h | ||
dp_catalog.c | ||
dp_catalog.h | ||
dp_ctrl.c | ||
dp_ctrl.h | ||
dp_debug.c | ||
dp_debug.h | ||
dp_display.c | ||
dp_display.h | ||
dp_drm.c | ||
dp_drm.h | ||
dp_hpd.c | ||
dp_hpd.h | ||
dp_link.c | ||
dp_link.h | ||
dp_panel.c | ||
dp_panel.h | ||
dp_parser.c | ||
dp_parser.h | ||
dp_power.c | ||
dp_power.h | ||
dp_reg.h |