* [RESEND PATCH] spi: mediatek: fix wrong error return value on probe
@ 2015-09-15 12:46 Javier Martinez Canillas
2015-09-18 21:04 ` Matthias Brugger
0 siblings, 1 reply; 2+ messages in thread
From: Javier Martinez Canillas @ 2015-09-15 12:46 UTC (permalink / raw)
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: Javier Martinez Canillas, Mark Brown,
linux-spi-u79uwXL29TY76Z2rM5mHXA,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Matthias Brugger,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Commit adcbcfea15d62 ("spi: mediatek: fix spi clock usage error")
added a new sel_clk but introduced bugs in the error paths since
the wrong struct clk pointers are passed to PTR_ERR().
Fixes: adcbcfea15d62 ("spi: mediatek: fix spi clock usage error")
Signed-off-by: Javier Martinez Canillas <javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
---
Patch based on git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
branch fix/mediatek but also applies cleanly to branch for-linus.
It's the exact same patch than before so I don't know what went wrong.
drivers/spi/spi-mt65xx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
index 6fbb5e5132b0..e9839a4e0175 100644
--- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c
@@ -585,14 +585,14 @@ static int mtk_spi_probe(struct platform_device *pdev)
mdata->sel_clk = devm_clk_get(&pdev->dev, "sel-clk");
if (IS_ERR(mdata->sel_clk)) {
- ret = PTR_ERR(mdata->spi_clk);
+ ret = PTR_ERR(mdata->sel_clk);
dev_err(&pdev->dev, "failed to get sel-clk: %d\n", ret);
goto err_put_master;
}
mdata->spi_clk = devm_clk_get(&pdev->dev, "spi-clk");
if (IS_ERR(mdata->spi_clk)) {
- ret = PTR_ERR(mdata->parent_clk);
+ ret = PTR_ERR(mdata->spi_clk);
dev_err(&pdev->dev, "failed to get spi-clk: %d\n", ret);
goto err_put_master;
}
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RESEND PATCH] spi: mediatek: fix wrong error return value on probe
2015-09-15 12:46 [RESEND PATCH] spi: mediatek: fix wrong error return value on probe Javier Martinez Canillas
@ 2015-09-18 21:04 ` Matthias Brugger
0 siblings, 0 replies; 2+ messages in thread
From: Matthias Brugger @ 2015-09-18 21:04 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel, Mark Brown, linux-spi, linux-mediatek,
linux-arm-kernel
On Tuesday, September 15, 2015 02:46:45 PM Javier Martinez Canillas wrote:
> Commit adcbcfea15d62 ("spi: mediatek: fix spi clock usage error")
> added a new sel_clk but introduced bugs in the error paths since
> the wrong struct clk pointers are passed to PTR_ERR().
>
> Fixes: adcbcfea15d62 ("spi: mediatek: fix spi clock usage error")
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
> ---
> Patch based on git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
> branch fix/mediatek but also applies cleanly to branch for-linus.
>
> It's the exact same patch than before so I don't know what went wrong.
>
> drivers/spi/spi-mt65xx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
> index 6fbb5e5132b0..e9839a4e0175 100644
> --- a/drivers/spi/spi-mt65xx.c
> +++ b/drivers/spi/spi-mt65xx.c
> @@ -585,14 +585,14 @@ static int mtk_spi_probe(struct platform_device *pdev)
>
> mdata->sel_clk = devm_clk_get(&pdev->dev, "sel-clk");
> if (IS_ERR(mdata->sel_clk)) {
> - ret = PTR_ERR(mdata->spi_clk);
> + ret = PTR_ERR(mdata->sel_clk);
> dev_err(&pdev->dev, "failed to get sel-clk: %d\n", ret);
> goto err_put_master;
> }
>
> mdata->spi_clk = devm_clk_get(&pdev->dev, "spi-clk");
> if (IS_ERR(mdata->spi_clk)) {
> - ret = PTR_ERR(mdata->parent_clk);
> + ret = PTR_ERR(mdata->spi_clk);
> dev_err(&pdev->dev, "failed to get spi-clk: %d\n", ret);
> goto err_put_master;
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-18 21:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-15 12:46 [RESEND PATCH] spi: mediatek: fix wrong error return value on probe Javier Martinez Canillas
2015-09-18 21:04 ` Matthias Brugger
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).