]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mtd: rawnand: qcom: Return actual error code instead of -ENODEV
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Tue, 2 Mar 2021 13:27:57 +0000 (18:57 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 08:49:38 +0000 (10:49 +0200)
commitb13202c84c4ddec227f7ac304eae180590a57536
tree43611c2231d96a6bb8dbe03d9b9397b2b62d99d1
parentdc249005840567e28208f7295e20ac91cc777736
mtd: rawnand: qcom: Return actual error code instead of -ENODEV

[ Upstream commit 55fbb9ba4f06cb6aff32daca1e1910173c13ec51 ]

In qcom_probe_nand_devices() function, the error code returned by
qcom_nand_host_init_and_register() is converted to -ENODEV in the case
of failure. This poses issue if -EPROBE_DEFER is returned when the
dependency is not available for a component like parser.

So let's restructure the error handling logic a bit and return the
actual error code in case of qcom_nand_host_init_and_register() failure.

Fixes: c76b78d8ec05 ("mtd: nand: Qualcomm NAND controller driver")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mtd/nand/raw/qcom_nandc.c