Skip to content

Commit 1922cc9

Browse files
Wan Jiabingdtor
authored andcommitted
Input: bcm-keypad - remove unneeded NULL check before clk_disable_unprepare
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>
1 parent c8994b3 commit 1922cc9

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/input/keyboard/bcm-keypad.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,7 @@ static void bcm_kp_stop(const struct bcm_kp *kp)
183183
writel(0xFFFFFFFF, kp->base + KPICR0_OFFSET);
184184
writel(0xFFFFFFFF, kp->base + KPICR1_OFFSET);
185185

186-
if (kp->clk)
187-
clk_disable_unprepare(kp->clk);
186+
clk_disable_unprepare(kp->clk);
188187
}
189188

190189
static int bcm_kp_open(struct input_dev *dev)

0 commit comments

Comments
 (0)