|
@@ -2263,12 +2263,15 @@ scan_tail:
|
|
|
|
|
|
err = mtd_device_register(mtd, NULL, 0);
|
|
err = mtd_device_register(mtd, NULL, 0);
|
|
if (err)
|
|
if (err)
|
|
- goto return_error;
|
|
|
|
|
|
+ goto cleanup_nand;
|
|
|
|
|
|
platform_set_drvdata(pdev, mtd);
|
|
platform_set_drvdata(pdev, mtd);
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
|
|
+cleanup_nand:
|
|
|
|
+ nand_cleanup(nand_chip);
|
|
|
|
+
|
|
return_error:
|
|
return_error:
|
|
if (!IS_ERR_OR_NULL(info->dma))
|
|
if (!IS_ERR_OR_NULL(info->dma))
|
|
dma_release_channel(info->dma);
|
|
dma_release_channel(info->dma);
|