]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Input: bcm-keypad - remove unneeded NULL check before clk_disable_unprepare
authorWan Jiabing <wanjiabing@vivo.com>
Mon, 16 May 2022 22:24:31 +0000 (15:24 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 17 May 2022 04:10:12 +0000 (21:10 -0700)
clk_disable_unprepare() already checks NULL by using IS_ERR_OR_NULL.
Remove unneeded NULL check for kp->clk.

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Link: https://lore.kernel.org/r/20220516085511.10679-1-wanjiabing@vivo.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/bcm-keypad.c

index 2b771c3a557846631b708b4435b4b605d51804cb..166d6023a53884eac7ebcaf9df2763379c05f8f9 100644 (file)
@@ -183,8 +183,7 @@ static void bcm_kp_stop(const struct bcm_kp *kp)
        writel(0xFFFFFFFF, kp->base + KPICR0_OFFSET);
        writel(0xFFFFFFFF, kp->base + KPICR1_OFFSET);
 
-       if (kp->clk)
-               clk_disable_unprepare(kp->clk);
+       clk_disable_unprepare(kp->clk);
 }
 
 static int bcm_kp_open(struct input_dev *dev)