drm: rcar-du: remove an unneeded NULL check
Subsystems (4)
PATCH 1/1 drm: rcar-du: remove an unneeded NULL check
"params" can't be NULL here. The next lines assume that we either hit the break statement of "params->mpixelclock == ~0UL". The inconsistent NULL checking makes static checkers complain. I've just removed the test.
Signed-off-by Dan Carpenter <[email protected]>
drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c +1 -1
@@ -45,7 +45,7 @@ static int rcar_hdmi_phy_configure(struct dw_hdmi *hdmi, {const struct rcar_hdmi_phy_params *params = rcar_hdmi_phy_params; -for (; params && params->mpixelclock != ~0UL ; ++params) { +for (; params->mpixelclock != ~0UL ; ++params) {if (mpixelclock <= params->mpixelclock)break ; }
Hi Dan,
Thank you for the patch.
Quoted 6 lines · On Friday 30 Jun 2017 11:00:12 Dan Carpenter wrote:
"params" can't be NULL here. The next lines assume that we either hit the break statement of "
params->mpixelclock== ~0UL". The inconsistent NULL checking makes static checkers complain. I've just removed the test.Signed-off-by Dan Carpenter <[email protected]>
Reviewed-by Laurent Pinchart <[email protected]>
and taken in my tree for v4.14.
Quoted 14 lines
(quoted diff) +0
-0
b/drivers/gpu/drm/rcar-du/rcar_dw_hdmi.cindex7539626b8ebd..dc85b53d58ef100644drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c +1
-1@@ -45,7 +45,7 @@ static int rcar_hdmi_phy_configure(struct dw_hdmi *hdmi, {const struct rcar_hdmi_phy_params *params = rcar_hdmi_phy_params; -for (; params && params->mpixelclock != ~0UL ; ++params) { +for (; params->mpixelclock != ~0UL ; ++params) {if (mpixelclock <= params->mpixelclock)break ; }
Signature · 3 lines
Regards, Laurent Pinchart