watchdog: npcm: Remove unnecessary NULL check before clk_prepare_enable/clk_disable_unprepare
clk_prepare_enable() and clk_disable_unprepare() already checked NULL clock parameter.Remove unneeded NULL check for clk here. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20250313084420.2481763-1-nichen@iscas.ac.cn Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>pull/1193/head
parent
c40524d161
commit
ad3746700a
|
|
@ -68,7 +68,6 @@ static int npcm_wdt_start(struct watchdog_device *wdd)
|
|||
struct npcm_wdt *wdt = to_npcm_wdt(wdd);
|
||||
u32 val;
|
||||
|
||||
if (wdt->clk)
|
||||
clk_prepare_enable(wdt->clk);
|
||||
|
||||
if (wdd->timeout < 2)
|
||||
|
|
@ -105,7 +104,6 @@ static int npcm_wdt_stop(struct watchdog_device *wdd)
|
|||
|
||||
writel(0, wdt->reg);
|
||||
|
||||
if (wdt->clk)
|
||||
clk_disable_unprepare(wdt->clk);
|
||||
|
||||
return 0;
|
||||
|
|
@ -156,7 +154,6 @@ static int npcm_wdt_restart(struct watchdog_device *wdd,
|
|||
struct npcm_wdt *wdt = to_npcm_wdt(wdd);
|
||||
|
||||
/* For reset, we start the WDT clock and leave it running. */
|
||||
if (wdt->clk)
|
||||
clk_prepare_enable(wdt->clk);
|
||||
|
||||
writel(NPCM_WTR | NPCM_WTRE | NPCM_WTE, wdt->reg);
|
||||
|
|
|
|||
Loading…
Reference in New Issue