mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
mtd: nand: mxc_nand: Check the return value from clk_prepare_enable()
clk_prepare_enable() may fail, so let's check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
This commit is contained in:
parent
0566477762
commit
dcedf628f5
1 changed files with 3 additions and 1 deletions
|
@ -1511,7 +1511,9 @@ static int mxcnd_probe(struct platform_device *pdev)
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
clk_prepare_enable(host->clk);
|
||||
err = clk_prepare_enable(host->clk);
|
||||
if (err)
|
||||
return err;
|
||||
host->clk_act = 1;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue