diff options
author | Bjorn Andersson <bjorn.andersson@sonymobile.com> | 2015-08-17 12:19:03 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2015-09-09 15:39:07 -0400 |
commit | bf5125d5e0759a0f513b1bcd33c15edc0cf4c17b (patch) | |
tree | a2d5ceb13f832a90452a22b39ae2b1a5951b3e2d | |
parent | a97a09bd119fbdf4ba8c634fed8f4148d1def1e0 (diff) |
watchdog: at91rm9200: Correct check for syscon_node_to_regmap() errors
syscon_node_to_regmap() returns a regmap or an ERR_PTR().
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
-rw-r--r-- | drivers/watchdog/at91rm9200_wdt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/at91rm9200_wdt.c b/drivers/watchdog/at91rm9200_wdt.c index 41cecb55766c..464bf76842a4 100644 --- a/drivers/watchdog/at91rm9200_wdt.c +++ b/drivers/watchdog/at91rm9200_wdt.c | |||
@@ -244,7 +244,7 @@ static int at91wdt_probe(struct platform_device *pdev) | |||
244 | } | 244 | } |
245 | 245 | ||
246 | regmap_st = syscon_node_to_regmap(parent->of_node); | 246 | regmap_st = syscon_node_to_regmap(parent->of_node); |
247 | if (!regmap_st) | 247 | if (IS_ERR(regmap_st)) |
248 | return -ENODEV; | 248 | return -ENODEV; |
249 | 249 | ||
250 | res = misc_register(&at91wdt_miscdev); | 250 | res = misc_register(&at91wdt_miscdev); |