aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-10-31 03:50:55 -0400
committerWim Van Sebroeck <wim@iguana.be>2013-11-17 13:38:44 -0500
commit0859ffc3b3cb673ac1d3f33b0265cf60d1e3836d (patch)
tree25aabd56b0355cd4494ae33a27d09a1b663f05c8 /drivers/watchdog
parent6ffcff931971ce78d08220a7a3bbaddaea207598 (diff)
watchdog: rt2880_wdt: fix return value check in rt288x_wdt_probe()
In case of error, the function devm_request_and_ioremap() returns NULL pointer not ERR_PTR(). Fix it by using devm_ioremap_resource() instead of devm_request_and_ioremap(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/rt2880_wdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/rt2880_wdt.c b/drivers/watchdog/rt2880_wdt.c
index a9f84919df7f..53d37fea183e 100644
--- a/drivers/watchdog/rt2880_wdt.c
+++ b/drivers/watchdog/rt2880_wdt.c
@@ -144,7 +144,7 @@ static int rt288x_wdt_probe(struct platform_device *pdev)
144 int ret; 144 int ret;
145 145
146 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 146 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
147 rt288x_wdt_base = devm_request_and_ioremap(&pdev->dev, res); 147 rt288x_wdt_base = devm_ioremap_resource(&pdev->dev, res);
148 if (IS_ERR(rt288x_wdt_base)) 148 if (IS_ERR(rt288x_wdt_base))
149 return PTR_ERR(rt288x_wdt_base); 149 return PTR_ERR(rt288x_wdt_base);
150 150