[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220516085511.10679-1-wanjiabing@vivo.com>
Date: Mon, 16 May 2022 16:55:09 +0800
From: Wan Jiabing <wanjiabing@...o.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Wan Jiabing <wanjiabing@...o.com>, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] Input: 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@...o.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
Powered by blists - more mailing lists