diff options
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/docg4.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/mtd/nand/docg4.c b/drivers/mtd/nand/docg4.c index cb6efadd712e..24d478d90dcc 100644 --- a/drivers/mtd/nand/docg4.c +++ b/drivers/mtd/nand/docg4.c @@ -1353,14 +1353,10 @@ static int __init probe_docg4(struct platform_device *pdev) doc->mtd = mtd; return 0; - fail: - if (nand) { - /* re-declarations avoid compiler warning */ - struct docg4_priv *doc = nand->priv; - nand_release(mtd); /* deletes partitions and mtd devices */ - free_bch(doc->bch); - kfree(nand); - } +fail: + nand_release(mtd); /* deletes partitions and mtd devices */ + free_bch(doc->bch); + kfree(nand); fail_unmap: iounmap(virtadr); |