Skip to content

Commit

Permalink
watchdog: at91rm9200: Correct check for syscon_node_to_regmap() errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bjorn Andersson authored and Wim Van Sebroeck committed Sep 9, 2015
1 parent a97a09b commit bf5125d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/watchdog/at91rm9200_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bf5125d

Please sign in to comment.