mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 01:00:52 +07:00
watchdog: bcm_kona_wdt: Use correct return value for bcm_kona_wdt_probe()
When call function devm_platform_ioremap_resource(), we should use IS_ERR() to check the return value and return PTR_ERR() if failed. Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/1590391864-308-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
This commit is contained in:
parent
ff01cb1ca1
commit
fd99897245
@ -279,7 +279,7 @@ static int bcm_kona_wdt_probe(struct platform_device *pdev)
|
||||
|
||||
wdt->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(wdt->base))
|
||||
return -ENODEV;
|
||||
return PTR_ERR(wdt->base);
|
||||
|
||||
wdt->resolution = SECWDOG_DEFAULT_RESOLUTION;
|
||||
ret = bcm_kona_wdt_set_resolution_reg(wdt);
|
||||
|
Loading…
Reference in New Issue
Block a user