watchdog: of_xilinx_wdt: Remove passing null pointer
authorSrinivas Neeli <srinivas.neeli@xilinx.com>
Mon, 29 Mar 2021 16:19:38 +0000 (21:49 +0530)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Mon, 21 Jun 2021 06:49:07 +0000 (08:49 +0200)
commitf185de2231ce3214bb242f56b5d73641d5269508
tree5e2b9033e1026e06a5f7cec2bda5d81038d50f7a
parenta40b2c3dc360d2c8c8614864f523dd0923b5f876
watchdog: of_xilinx_wdt: Remove passing null pointer

clk is an optional property, if clock not defined,
calling clk_prepare_enable() and devm_add_action_or_reset()
are not useful.
so calling these two apis only when clock is present.

Addresses-Coverity:"FORWARD_NULL"

Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210329161939.37680-5-srinivas.neeli@xilinx.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/of_xilinx_wdt.c