mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-09 10:09:11 +00:00
mtd: rawnand: hisi504: fix the probe function error path
An error after nand_scan_tail() should trigger a nand_cleanup() and not a nand_release(). The latter doing an mtd_device_unregister() which is not needed if mtd_device_register() failed. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
This commit is contained in:
parent
9326dc754c
commit
6f533c4631
1 changed files with 1 additions and 1 deletions
|
@ -808,7 +808,7 @@ static int hisi_nfc_probe(struct platform_device *pdev)
|
|||
ret = mtd_device_register(mtd, NULL, 0);
|
||||
if (ret) {
|
||||
dev_err(dev, "Err MTD partition=%d\n", ret);
|
||||
nand_release(mtd);
|
||||
nand_cleanup(chip);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue