Messages in this thread Patch in this message |  | | From | Xu Wang <> | Subject | [PATCH] drm/armada: Remove redundant null check before clk_disable_unprepare | Date | Fri, 27 Nov 2020 09:10:56 +0000 |
| |
Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang <vulab@iscas.ac.cn> --- drivers/gpu/drm/armada/armada_510.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/armada/armada_510.c b/drivers/gpu/drm/armada/armada_510.c index 93d5c0a2d49a..05fe97900b13 100644 --- a/drivers/gpu/drm/armada/armada_510.c +++ b/drivers/gpu/drm/armada/armada_510.c @@ -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, -- 2.17.1
|  |