diff options
author | Javier Martinez Canillas <javier@osg.samsung.com> | 2015-09-15 14:46:45 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-09-16 21:45:11 +0200 |
commit | e26d15f735f570a1178c3bba4d85e6f58e098fdd (patch) | |
tree | 9197d5d71ecede4f53f49851d49cdf9dc56b2455 /drivers/spi/spi-mt65xx.c | |
parent | spi: Mediatek: Document devicetree bindings update for spi bus (diff) | |
download | linux-e26d15f735f570a1178c3bba4d85e6f58e098fdd.tar.xz linux-e26d15f735f570a1178c3bba4d85e6f58e098fdd.zip |
spi: mediatek: fix wrong error return value on probe
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>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-mt65xx.c')
-rw-r--r-- | drivers/spi/spi-mt65xx.c | 4 |
1 files 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; } |