mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
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>
This commit is contained in:
parent
6ffcff9319
commit
0859ffc3b3
1 changed files with 1 additions and 1 deletions
|
|
@ -144,7 +144,7 @@ static int rt288x_wdt_probe(struct platform_device *pdev)
|
|||
int ret;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
rt288x_wdt_base = devm_request_and_ioremap(&pdev->dev, res);
|
||||
rt288x_wdt_base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(rt288x_wdt_base))
|
||||
return PTR_ERR(rt288x_wdt_base);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue