Commit d3601e56 authored by Cyril Roelandt's avatar Cyril Roelandt Committed by 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: default avatarCyril Roelandt <tipecaml@gmail.com>
Acked-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment