mtd: mtd_oobtest: fix error return code in mtd_oobtest_init()
authorZhang Xiaoxu <zhangxiaoxu5@huawei.com>
Fri, 9 Apr 2021 01:07:39 +0000 (21:07 -0400)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 10 May 2021 08:44:37 +0000 (10:44 +0200)
commite4f3c9118f27b3b400db9993dd8bfd028d3b86ca
treea4220cce7b52137e6ab3aec97c0713e41e6bd821
parentda1e6fe563e62801fa033255f68c0bb9bf8c2c69
mtd: mtd_oobtest: fix error return code in mtd_oobtest_init()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210409010739.1021001-1-zhangxiaoxu5@huawei.com
drivers/mtd/tests/oobtest.c