]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
mtd: onenand: samsung: Propagate the error returned by 'onenand_scan()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 14 Dec 2017 06:03:51 +0000 (07:03 +0100)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Mon, 18 Dec 2017 16:37:51 +0000 (17:37 +0100)
Propagate the error code returned by 'onenand_scan()' instead of a
hard-coded -EFAULT.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/onenand/samsung.c

index c5416d6ad5719b2389ec449b671672a4b5156c77..7e84a1bb91f32dd4631eff63fa17e27693064b8e 100644 (file)
@@ -922,8 +922,9 @@ static int s3c_onenand_probe(struct platform_device *pdev)
                }
        }
 
-       if (onenand_scan(mtd, 1))
-               return -EFAULT;
+       err = onenand_scan(mtd, 1);
+       if (err)
+               return err;
 
        if (onenand->type != TYPE_S5PC110) {
                /* S3C doesn't handle subpage write */