* [PATCH] Input: Remove unneeded NULL check before clk_disable_unprepare
@ 2022-05-16 8:55 Wan Jiabing
2022-05-18 4:47 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Wan Jiabing @ 2022-05-16 8:55 UTC (permalink / raw)
To: Dmitry Torokhov, Wan Jiabing, linux-input, linux-kernel
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>
---
drivers/input/keyboard/bcm-keypad.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/input/keyboard/bcm-keypad.c b/drivers/input/keyboard/bcm-keypad.c
index 2b771c3a5578..166d6023a538 100644
--- a/drivers/input/keyboard/bcm-keypad.c
+++ b/drivers/input/keyboard/bcm-keypad.c
@@ -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)
--
2.36.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-18 4:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-16 8:55 [PATCH] Input: Remove unneeded NULL check before clk_disable_unprepare Wan Jiabing
2022-05-18 4:47 ` Dmitry Torokhov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.