The return value is not propagated in some of the error
paths. Fix the same by passing the value to err.

  CC      drivers/mtd/nand/omap2.o
drivers/mtd/nand/omap2.c: In function 'omap_nand_probe':
drivers/mtd/nand/omap2.c:1154: warning: 'err' may be used uninitialized in this 
function
  LD      drivers/mtd/nand/built-in.o

Signed-off-by: Shubhrajyoti D <shubhrajy...@ti.com>
---
 drivers/mtd/nand/omap2.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index e9309b3..29a32e5 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1258,6 +1258,7 @@ static int __devinit omap_nand_probe(struct 
platform_device *pdev)
                        if (rc) {
                                dev_err(&pdev->dev, "DMA engine slave config 
failed: %d\n",
                                        rc);
+                               err = rc;
                                goto out_release_mem_region;
                        }
                        info->nand.read_buf   = omap_read_buf_dma_pref;
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to