drm: bridge: dw-hdmi: Remove redundant null check before clk_disable_unprepare
Subsystems (3)
PATCH 1/1 drm: bridge: dw-hdmi: Remove redundant null check before clk_disable_unprepare
Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove them.
Signed-off-by Xu Wang <[email protected]>
--- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +2 -4
@@ -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);
Signature · 1 line
2.17.1
Hi Xu Wang,
Thank you for the patch.
Quoted 4 lines · Xu Wang
Because
clk_disable_unprepare()already checked NULL clock parameter, so the additional check is unnecessary, just remove them.Signed-off-by Xu Wang <[email protected]>
Reviewed-by Laurent Pinchart <[email protected]>
Quoted 28 lines
--- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +2
-4@@ -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);
Signature · 7 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel