Skip to contentSkip to conversation

mmc: usdhi6rol0: fix error return code in usdhi6_probe()

PATCH In review Zhen Lei 2 participants 2 messages May 8, 2021 – May 11, 2021

Subsystems (2)
lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

PATCH 1/1 mmc: usdhi6rol0: fix error return code in usdhi6_probe()

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")
---
 drivers/mmc/host/usdhi6rol0.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mmc/host/usdhi6rol0.c +1 -0
index 615f3d008af1..b9b79b1089a0 100644
@@ -1801,6 +1801,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;
 	}
Signature · 1 line
2.25.1
#1 lore raw
Quoted 7 lines · Zhen Lei

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")

Applied for next, thanks!

Kind regards
Uffe

Quoted 20 lines
---
 drivers/mmc/host/usdhi6rol0.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mmc/host/usdhi6rol0.c +1 -1
index 615f3d008af1..b9b79b1089a0 100644
@@ -1801,6 +1801,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.25.1