* [PATCH -next] mmc: sdhci-of-dwcmshc: fix error return code in dwcmshc_probe()
@ 2021-03-23 11:29 'w00385741
2021-03-24 10:20 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: 'w00385741 @ 2021-03-23 11:29 UTC (permalink / raw)
To: weiyongjun1, Adrian Hunter, Ulf Hansson, Shawn Lin
Cc: linux-mmc, kernel-janitors, Hulk Robot
From: Wei Yongjun <weiyongjun1@huawei.com>
Fix to return negative error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: c2c4da37837e ("mmc: sdhci-of-dwcmshc: add rockchip platform support")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/mmc/host/sdhci-of-dwcmshc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c
index 06873686d5e9..e96c628aeeeb 100644
--- a/drivers/mmc/host/sdhci-of-dwcmshc.c
+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
@@ -383,8 +383,10 @@ static int dwcmshc_probe(struct platform_device *pdev)
if (pltfm_data == &sdhci_dwcmshc_rk3568_pdata) {
rk_priv = devm_kzalloc(&pdev->dev, sizeof(struct rk3568_priv), GFP_KERNEL);
- if (!rk_priv)
+ if (!rk_priv) {
+ err = -ENOMEM;
goto err_clk;
+ }
priv->priv = rk_priv;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] mmc: sdhci-of-dwcmshc: fix error return code in dwcmshc_probe()
2021-03-23 11:29 [PATCH -next] mmc: sdhci-of-dwcmshc: fix error return code in dwcmshc_probe() 'w00385741
@ 2021-03-24 10:20 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2021-03-24 10:20 UTC (permalink / raw)
To: 'w00385741
Cc: Adrian Hunter, Shawn Lin, linux-mmc, kernel-janitors, Hulk Robot
On Tue, 23 Mar 2021 at 12:20, 'w00385741 <weiyongjun1@huawei.com> wrote:
>
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Fix to return negative error code -ENOMEM from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Fixes: c2c4da37837e ("mmc: sdhci-of-dwcmshc: add rockchip platform support")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/sdhci-of-dwcmshc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c
> index 06873686d5e9..e96c628aeeeb 100644
> --- a/drivers/mmc/host/sdhci-of-dwcmshc.c
> +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
> @@ -383,8 +383,10 @@ static int dwcmshc_probe(struct platform_device *pdev)
>
> if (pltfm_data == &sdhci_dwcmshc_rk3568_pdata) {
> rk_priv = devm_kzalloc(&pdev->dev, sizeof(struct rk3568_priv), GFP_KERNEL);
> - if (!rk_priv)
> + if (!rk_priv) {
> + err = -ENOMEM;
> goto err_clk;
> + }
>
> priv->priv = rk_priv;
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-24 10:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23 11:29 [PATCH -next] mmc: sdhci-of-dwcmshc: fix error return code in dwcmshc_probe() 'w00385741
2021-03-24 10:20 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).