Message ID | 20201009063837.549356-1-nobuhiro1.iwamatsu@toshiba.co.jp |
---|---|
State | New |
Headers | show |
Series | [for,4.9,4.14] mtd: rawnand: sunxi: Fix the probe error path | expand |
diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nand.c index ddf3e24cc2898d..2cf19372efb90a 100644 --- a/drivers/mtd/nand/sunxi_nand.c +++ b/drivers/mtd/nand/sunxi_nand.c @@ -2108,7 +2108,7 @@ static int sunxi_nand_chip_init(struct device *dev, struct sunxi_nfc *nfc, ret = mtd_device_register(mtd, NULL, 0); if (ret) { dev_err(dev, "failed to register mtd device: %d\n", ret); - nand_release(nand); + nand_cleanup(nand); return ret; }