Skip to content

Commit

Permalink
spi: imx: fix error return code in spi_imx_probe()
Browse files Browse the repository at this point in the history
Fix to return error code -EINVAL if no CS GPIOs available
instead of 0, as done elsewhere in this function.

Fixes: f13d4e1 ("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>
  • Loading branch information
Wei Yongjun authored and Mark Brown committed Sep 28, 2016
1 parent f13d4e1 commit 446576f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/spi/spi-imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 446576f

Please sign in to comment.