mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-01 00:12:36 -05:00
watchdog: armada_37xx_wdt: check the return value of devm_ioremap() in armada_37xx_wdt_probe()
[ Upstream commit 2d27e52841092e5831dd41f313028c668d816eb0 ]
The function devm_ioremap() in armada_37xx_wdt_probe() can fail, so
its return value should be checked.
Fixes: 54e3d9b518 ("watchdog: Add support for Armada 37xx CPU watchdog")
Reported-by: Hacash Robot <[email protected]>
Signed-off-by: William Dean <[email protected]>
Reviewed-by: Marek Beh=C3=BAn <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
ba406e3100
commit
a9286ff4c1
1 changed files with 2 additions and 0 deletions
|
|
@ -274,6 +274,8 @@ static int armada_37xx_wdt_probe(struct platform_device *pdev)
|
|||
if (!res)
|
||||
return -ENODEV;
|
||||
dev->reg = devm_ioremap(&pdev->dev, res->start, resource_size(res));
|
||||
if (!dev->reg)
|
||||
return -ENOMEM;
|
||||
|
||||
/* init clock */
|
||||
dev->clk = devm_clk_get(&pdev->dev, NULL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue