2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-17 09:43:59 +08:00

watchdog: davinci: Handle return value of clk_prepare_enable

clk_prepare_enable() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
This commit is contained in:
Arvind Yadav 2017-06-06 15:47:53 +05:30 committed by Wim Van Sebroeck
parent 65360944c1
commit 8f11eb58ad

View File

@ -173,7 +173,11 @@ static int davinci_wdt_probe(struct platform_device *pdev)
return PTR_ERR(davinci_wdt->clk);
}
clk_prepare_enable(davinci_wdt->clk);
ret = clk_prepare_enable(davinci_wdt->clk);
if (ret) {
dev_err(&pdev->dev, "failed to prepare clock\n");
return ret;
}
platform_set_drvdata(pdev, davinci_wdt);