Commit b3e1cf31 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Ulf Hansson

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: 19c6beaa ("mmc: meson-gx: add device reset")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/be4b863bacf323521ba3a02efdc4fca9cdedd1a6.1659855351.git.christophe.jaillet@wanadoo.frSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent cc5d1692
...@@ -1172,8 +1172,10 @@ static int meson_mmc_probe(struct platform_device *pdev) ...@@ -1172,8 +1172,10 @@ static int meson_mmc_probe(struct platform_device *pdev)
} }
ret = device_reset_optional(&pdev->dev); ret = device_reset_optional(&pdev->dev);
if (ret) if (ret) {
return dev_err_probe(&pdev->dev, ret, "device reset failed\n"); dev_err_probe(&pdev->dev, ret, "device reset failed\n");
goto free_host;
}
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
host->regs = devm_ioremap_resource(&pdev->dev, res); host->regs = devm_ioremap_resource(&pdev->dev, res);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment