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: f13d4e189d ("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>
This commit is contained in:
Wei Yongjun 2016-09-28 14:50:18 +00:00 committed by Mark Brown
parent f13d4e189d
commit 446576f9ea
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}