diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-06-01 12:58:15 +0200 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@free-electrons.com> | 2017-06-10 12:09:27 +0200 |
commit | 3762a33b007b63e058eb600eccf0bcd097d386f5 (patch) | |
tree | 2c7681b1509169e77bd0ebfad340db816ad1dff4 /drivers/mtd/nand/orion_nand.c | |
parent | mtd: nand: fsl_ifc: fix handing of bit flips in erased pages (diff) | |
download | linux-3762a33b007b63e058eb600eccf0bcd097d386f5.tar.xz linux-3762a33b007b63e058eb600eccf0bcd097d386f5.zip |
mtd: nand: orion: 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>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'drivers/mtd/nand/orion_nand.c')
-rw-r--r-- | drivers/mtd/nand/orion_nand.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c index f8e463a97b9e..209170ed2b76 100644 --- a/drivers/mtd/nand/orion_nand.c +++ b/drivers/mtd/nand/orion_nand.c @@ -166,7 +166,11 @@ static int __init orion_nand_probe(struct platform_device *pdev) } } - clk_prepare_enable(info->clk); + ret = clk_prepare_enable(info->clk); + if (ret) { + dev_err(&pdev->dev, "failed to prepare clock!\n"); + return ret; + } ret = nand_scan(mtd, 1); if (ret) |