mtd: rawnand: fsmc: Fix error code in fsmc_nand_probe()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 15 Feb 2021 15:58:49 +0000 (18:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 07:50:09 +0000 (09:50 +0200)
commitc8f3837c51f8537764c33df570f3d549326c5043
treedd245707c94e16f1a87e56deb15c45e21effac77
parent82a0cadf6fa5f16e9b9d85f9be9fd20c7b65a152
mtd: rawnand: fsmc: Fix error code in fsmc_nand_probe()

[ Upstream commit e7a97528e3c787802d8c643d6ab2f428511bb047 ]

If dma_request_channel() fails then the probe fails and it should
return a negative error code, but currently it returns success.

fixes: 4774fb0a48aa ("mtd: nand/fsmc: Add DMA support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/YCqaOZ83OvPOzLwh@mwanda
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mtd/nand/raw/fsmc_nand.c