Thread (423 messages) 423 messages, 2 authors, 2021-07-19
STALE1777d

[PATCH 4.19 109/421] mmc: usdhi6rol0: fix error return code in usdhi6_probe()

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2021-07-19 16:11:09
Also in: lkml
Subsystem: arm/artpec machine support, multimedia card (mmc), secure digital (sd) and sdio subsystem, the rest · Maintainers: Jesper Nilsson, Lars Persson, Ulf Hansson, Linus Torvalds

From: Zhen Lei <redacted>

[ Upstream commit 2f9ae69e5267f53e89e296fccee291975a85f0eb ]

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

Fixes: 75fa9ea6e3c0 ("mmc: add a driver for the Renesas usdhi6rol0 SD/SDIO host controller")
Reported-by: Hulk Robot <redacted>
Signed-off-by: Zhen Lei <redacted>
Link: https://lore.kernel.org/r/20210508020321.1677-1-thunder.leizhen@huawei.com (local)
Signed-off-by: Ulf Hansson <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/mmc/host/usdhi6rol0.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c
index ef3aa8b52078..b88728b686e8 100644
--- a/drivers/mmc/host/usdhi6rol0.c
+++ b/drivers/mmc/host/usdhi6rol0.c
@@ -1809,6 +1809,7 @@ static int usdhi6_probe(struct platform_device *pdev)
 
 	version = usdhi6_read(host, USDHI6_VERSION);
 	if ((version & 0xfff) != 0xa0d) {
+		ret = -EPERM;
 		dev_err(dev, "Version not recognized %x\n", version);
 		goto e_clk_off;
 	}
-- 
2.30.2


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help