* [PATCH] mmc: meson-gx: Fix an error handling path in meson_mmc_probe()
@ 2022-08-07 6:56 ` Christophe JAILLET
0 siblings, 0 replies; 6+ messages in thread
From: Christophe JAILLET @ 2022-08-07 6:56 UTC (permalink / raw)
To: Ulf Hansson, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-mmc,
linux-arm-kernel, linux-amlogic
The commit in Fixes has introduced a new error handling which should goto
the existing error handling path.
Otherwise some resources leak.
Fixes: 19c6beaa064c ("mmc: meson-gx: add device reset")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/mmc/host/meson-gx-mmc.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 2f08d442e557..fc462995cf94 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -1172,8 +1172,10 @@ static int meson_mmc_probe(struct platform_device *pdev)
}
ret = device_reset_optional(&pdev->dev);
- if (ret)
- return dev_err_probe(&pdev->dev, ret, "device reset failed\n");
+ if (ret) {
+ dev_err_probe(&pdev->dev, ret, "device reset failed\n");
+ goto free_host;
+ }
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
host->regs = devm_ioremap_resource(&pdev->dev, res);
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] mmc: meson-gx: Fix an error handling path in meson_mmc_probe()
@ 2022-08-07 6:56 ` Christophe JAILLET
0 siblings, 0 replies; 6+ messages in thread
From: Christophe JAILLET @ 2022-08-07 6:56 UTC (permalink / raw)
To: Ulf Hansson, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-mmc,
linux-arm-kernel, linux-amlogic
The commit in Fixes has introduced a new error handling which should goto
the existing error handling path.
Otherwise some resources leak.
Fixes: 19c6beaa064c ("mmc: meson-gx: add device reset")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/mmc/host/meson-gx-mmc.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 2f08d442e557..fc462995cf94 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -1172,8 +1172,10 @@ static int meson_mmc_probe(struct platform_device *pdev)
}
ret = device_reset_optional(&pdev->dev);
- if (ret)
- return dev_err_probe(&pdev->dev, ret, "device reset failed\n");
+ if (ret) {
+ dev_err_probe(&pdev->dev, ret, "device reset failed\n");
+ goto free_host;
+ }
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
host->regs = devm_ioremap_resource(&pdev->dev, res);
--
2.34.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] mmc: meson-gx: Fix an error handling path in meson_mmc_probe()
@ 2022-08-07 6:56 ` Christophe JAILLET
0 siblings, 0 replies; 6+ messages in thread
From: Christophe JAILLET @ 2022-08-07 6:56 UTC (permalink / raw)
To: Ulf Hansson, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-mmc,
linux-arm-kernel, linux-amlogic
The commit in Fixes has introduced a new error handling which should goto
the existing error handling path.
Otherwise some resources leak.
Fixes: 19c6beaa064c ("mmc: meson-gx: add device reset")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/mmc/host/meson-gx-mmc.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 2f08d442e557..fc462995cf94 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -1172,8 +1172,10 @@ static int meson_mmc_probe(struct platform_device *pdev)
}
ret = device_reset_optional(&pdev->dev);
- if (ret)
- return dev_err_probe(&pdev->dev, ret, "device reset failed\n");
+ if (ret) {
+ dev_err_probe(&pdev->dev, ret, "device reset failed\n");
+ goto free_host;
+ }
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
host->regs = devm_ioremap_resource(&pdev->dev, res);
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] mmc: meson-gx: Fix an error handling path in meson_mmc_probe()
2022-08-07 6:56 ` Christophe JAILLET
(?)
@ 2022-08-20 17:22 ` Martin Blumenstingl
-1 siblings, 0 replies; 6+ messages in thread
From: Martin Blumenstingl @ 2022-08-20 17:22 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Ulf Hansson, Neil Armstrong, Kevin Hilman, Jerome Brunet,
linux-kernel, kernel-janitors, linux-mmc, linux-arm-kernel,
linux-amlogic
On Sun, Aug 7, 2022 at 8:56 AM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> The commit in Fixes has introduced a new error handling which should goto
> the existing error handling path.
> Otherwise some resources leak.
>
> Fixes: 19c6beaa064c ("mmc: meson-gx: add device reset")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mmc: meson-gx: Fix an error handling path in meson_mmc_probe()
@ 2022-08-20 17:22 ` Martin Blumenstingl
0 siblings, 0 replies; 6+ messages in thread
From: Martin Blumenstingl @ 2022-08-20 17:22 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Ulf Hansson, Neil Armstrong, Kevin Hilman, Jerome Brunet,
linux-kernel, kernel-janitors, linux-mmc, linux-arm-kernel,
linux-amlogic
On Sun, Aug 7, 2022 at 8:56 AM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> The commit in Fixes has introduced a new error handling which should goto
> the existing error handling path.
> Otherwise some resources leak.
>
> Fixes: 19c6beaa064c ("mmc: meson-gx: add device reset")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mmc: meson-gx: Fix an error handling path in meson_mmc_probe()
@ 2022-08-20 17:22 ` Martin Blumenstingl
0 siblings, 0 replies; 6+ messages in thread
From: Martin Blumenstingl @ 2022-08-20 17:22 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Ulf Hansson, Neil Armstrong, Kevin Hilman, Jerome Brunet,
linux-kernel, kernel-janitors, linux-mmc, linux-arm-kernel,
linux-amlogic
On Sun, Aug 7, 2022 at 8:56 AM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> The commit in Fixes has introduced a new error handling which should goto
> the existing error handling path.
> Otherwise some resources leak.
>
> Fixes: 19c6beaa064c ("mmc: meson-gx: add device reset")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-08-20 17:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-07 6:56 [PATCH] mmc: meson-gx: Fix an error handling path in meson_mmc_probe() Christophe JAILLET
2022-08-07 6:56 ` Christophe JAILLET
2022-08-07 6:56 ` Christophe JAILLET
2022-08-20 17:22 ` Martin Blumenstingl
2022-08-20 17:22 ` Martin Blumenstingl
2022-08-20 17:22 ` Martin Blumenstingl
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.