Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Arvind Yadav and committed by
Boris Brezillon
3762a33b d45e5316

+5 -1
+5 -1
drivers/mtd/nand/orion_nand.c
··· 166 166 } 167 167 } 168 168 169 - clk_prepare_enable(info->clk); 169 + ret = clk_prepare_enable(info->clk); 170 + if (ret) { 171 + dev_err(&pdev->dev, "failed to prepare clock!\n"); 172 + return ret; 173 + } 170 174 171 175 ret = nand_scan(mtd, 1); 172 176 if (ret)