提交 d3601e56 编写于 作者: C Cyril Roelandt 提交者: Grant Likely

spi/sh-hspi: fix return value check in hspi_probe().

According to its documentation, clk_get() returns a "valid IS_ERR() condition
containing errno", so we should call IS_ERR() rather than a NULL check.
Signed-off-by: NCyril Roelandt <tipecaml@gmail.com>
Acked-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
上级 6a791313
......@@ -290,7 +290,7 @@ static int hspi_probe(struct platform_device *pdev)
}
clk = clk_get(NULL, "shyway_clk");
if (!clk) {
if (IS_ERR(clk)) {
dev_err(&pdev->dev, "shyway_clk is required\n");
ret = -EINVAL;
goto error0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册