Skip to contentSkip to conversation

drm/armada: Remove redundant null check before clk_disable_unprepare

PATCH New Xu Wang 1 participant 1 message Nov 27, 2020

Subsystems (2)
lore
Share & tools
lore

Xu Wang

author
#0 lore raw

PATCH 1/1 drm/armada: 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 it.

---
 drivers/gpu/drm/armada/armada_510.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/armada/armada_510.c +2 -4
index 93d5c0a2d49a..05fe97900b13 100644
@@ -132,10 +132,8 @@ static int armada510_crtc_compute_clock(struct armada_crtc *dcrtc,
 
 static void armada510_crtc_disable(struct armada_crtc *dcrtc)
 {
-	if (dcrtc->clk) {
-		clk_disable_unprepare(dcrtc->clk);
-		dcrtc->clk = NULL;
-	}
+	clk_disable_unprepare(dcrtc->clk);
+	dcrtc->clk = NULL;
 }
 
 static void armada510_crtc_enable(struct armada_crtc *dcrtc,
Signature · 1 line
2.17.1