Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 446576f9 authored by Wei Yongjun's avatar Wei Yongjun Committed by Mark Brown
Browse files

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: f13d4e18 ("spi: imx: Gracefully handle NULL master->cs_gpios")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarMarek Vasut <marex@denx.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f13d4e18
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -1270,6 +1270,7 @@ static int spi_imx_probe(struct platform_device *pdev)


	if (!master->cs_gpios) {
	if (!master->cs_gpios) {
		dev_err(&pdev->dev, "No CS GPIOs available\n");
		dev_err(&pdev->dev, "No CS GPIOs available\n");
		ret = -EINVAL;
		goto out_clk_put;
		goto out_clk_put;
	}
	}