mtd: phram: Fix error return code in phram_setup()
authorYu Kuai <yukuai3@huawei.com>
Thu, 8 Apr 2021 13:38:12 +0000 (21:38 +0800)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 10 May 2021 08:44:34 +0000 (10:44 +0200)
commitda1e6fe563e62801fa033255f68c0bb9bf8c2c69
tree657964b65b92439ad206827df5bc6f0e9ad6ee4d
parentc054de10ae5d6d8b3f417cb8d29e67a7cd686f36
mtd: phram: Fix error return code in phram_setup()

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: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210408133812.1209798-1-yukuai3@huawei.com
drivers/mtd/devices/phram.c