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:
parent
65360944c1
commit
8f11eb58ad
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user