summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-imx.c
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2016-09-28 16:50:18 +0200
committerMark Brown <broonie@kernel.org>2016-09-28 18:50:55 +0200
commit446576f9ea5308c671eafb1cdc2a977b406c1dc5 (patch)
treec25e55f951b8a7244884b1c5ddf5086316b7728c /drivers/spi/spi-imx.c
parentspi: imx: Gracefully handle NULL master->cs_gpios (diff)
downloadlinux-446576f9ea5308c671eafb1cdc2a977b406c1dc5.tar.xz
linux-446576f9ea5308c671eafb1cdc2a977b406c1dc5.zip
spi: imx: fix error return code in spi_imx_probe()
Fix to return error code -EINVAL if no CS GPIOs available instead of 0, as done elsewhere in this function. Fixes: f13d4e189d20 ("spi: imx: Gracefully handle NULL master->cs_gpios") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-imx.c')
-rw-r--r--drivers/spi/spi-imx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index 1ef5429afcb6..deb782f6556c 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -1270,6 +1270,7 @@ static int spi_imx_probe(struct platform_device *pdev)
if (!master->cs_gpios) {
dev_err(&pdev->dev, "No CS GPIOs available\n");
+ ret = -EINVAL;
goto out_clk_put;
}