drm: rcar-du: Remove an unneeded NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 30 Jun 2017 08:00:12 +0000 (11:00 +0300)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 3 Aug 2017 13:17:25 +0000 (16:17 +0300)
"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 <dan.carpenter@oracle.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_dw_hdmi.c

index 7539626b8ebdf138a8ed860760fd71f700c11220..dc85b53d58ef2e8fb640e90afdac701e6397a1af 100644 (file)
@@ -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;
        }