summaryrefslogtreecommitdiff
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorTomer Maimon <tmaimon77@gmail.com>2021-01-20 01:34:12 +0300
committerJoel Stanley <joel@jms.id.au>2021-11-01 09:42:45 +0300
commitbaf077c075922e4187838638fd0a78ecb43e910e (patch)
treed446044d3a7fb3230906b75c71881bf9bef7c8e9 /drivers/watchdog
parent9634fd2f8f3536101b1a411f1e6e90a4c5ef952c (diff)
downloadlinux-baf077c075922e4187838638fd0a78ecb43e910e.tar.xz
watchdog: npcm: Modify get reset status function
Once the syscon phandle is not found the WD reset status will not be supported, so return to the function caller. OpenBMC-Staging-Count: 4 Signed-off-by: Tomer Maimon <tmaimon77@gmail.com> Link: https://lore.kernel.org/r/20210119223412.223492-5-tmaimon77@gmail.com Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/npcm_wdt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/watchdog/npcm_wdt.c b/drivers/watchdog/npcm_wdt.c
index 82fbfcddfc00..622b30566a5b 100644
--- a/drivers/watchdog/npcm_wdt.c
+++ b/drivers/watchdog/npcm_wdt.c
@@ -202,8 +202,10 @@ static void npcm_get_reset_status(struct npcm_wdt *wdt, struct device *dev)
u32 rstval;
gcr_regmap = syscon_regmap_lookup_by_phandle(dev->of_node, "syscon");
- if (IS_ERR(gcr_regmap))
+ if (IS_ERR(gcr_regmap)) {
dev_warn(dev, "Failed to find gcr syscon, WD reset status not supported\n");
+ return;
+ }
regmap_read(gcr_regmap, NPCM7XX_RESSR_OFFSET, &rstval);
if (!rstval) {