提交 446576f9 编写于 作者: W Wei Yongjun 提交者: Mark Brown

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: NWei Yongjun <weiyongjun1@huawei.com>
Acked-by: NMarek Vasut <marex@denx.de>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 f13d4e18
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册