Skip to content

Commit b3e1cf3

Browse files
tititiou36storulf
authored andcommitted
mmc: meson-gx: Fix an error handling path in meson_mmc_probe()
The commit in Fixes has introduced a new error handling which should goto the existing error handling path. Otherwise some resources leak. Fixes: 19c6bea ("mmc: meson-gx: add device reset") Signed-off-by: Christophe JAILLET <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/be4b863bacf323521ba3a02efdc4fca9cdedd1a6.1659855351.git.christophe.jaillet@wanadoo.fr Signed-off-by: Ulf Hansson <[email protected]>
1 parent cc5d169 commit b3e1cf3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/mmc/host/meson-gx-mmc.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,8 +1172,10 @@ static int meson_mmc_probe(struct platform_device *pdev)
11721172
}
11731173

11741174
ret = device_reset_optional(&pdev->dev);
1175-
if (ret)
1176-
return dev_err_probe(&pdev->dev, ret, "device reset failed\n");
1175+
if (ret) {
1176+
dev_err_probe(&pdev->dev, ret, "device reset failed\n");
1177+
goto free_host;
1178+
}
11771179

11781180
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
11791181
host->regs = devm_ioremap_resource(&pdev->dev, res);

0 commit comments

Comments
 (0)