]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm: bridge: dw-hdmi: Remove redundant null check before clk_disable_unprepare
authorXu Wang <vulab@iscas.ac.cn>
Fri, 27 Nov 2020 09:23:32 +0000 (09:23 +0000)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 5 Jan 2021 05:20:41 +0000 (07:20 +0200)
Because clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove them.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c

index 0c79a9ba48bb6407d7a001b2e03cca139d4ed28d..dda4fa9a1a08d8ef792b7cd2959360bb79e6b79d 100644 (file)
@@ -3440,8 +3440,7 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev,
 
 err_iahb:
        clk_disable_unprepare(hdmi->iahb_clk);
-       if (hdmi->cec_clk)
-               clk_disable_unprepare(hdmi->cec_clk);
+       clk_disable_unprepare(hdmi->cec_clk);
 err_isfr:
        clk_disable_unprepare(hdmi->isfr_clk);
 err_res:
@@ -3465,8 +3464,7 @@ void dw_hdmi_remove(struct dw_hdmi *hdmi)
 
        clk_disable_unprepare(hdmi->iahb_clk);
        clk_disable_unprepare(hdmi->isfr_clk);
-       if (hdmi->cec_clk)
-               clk_disable_unprepare(hdmi->cec_clk);
+       clk_disable_unprepare(hdmi->cec_clk);
 
        if (hdmi->i2c)
                i2c_del_adapter(&hdmi->i2c->adap);