From: Bjorn Andersson Date: Mon, 17 Aug 2015 16:19:03 +0000 (-0700) Subject: watchdog: at91rm9200: Correct check for syscon_node_to_regmap() errors X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bf5125d5e0759a0f513b1bcd33c15edc0cf4c17b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck --- 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) } regmap_st = syscon_node_to_regmap(parent->of_node); - if (!regmap_st) + if (IS_ERR(regmap_st)) return -ENODEV; res = misc_register(&at91wdt_miscdev);