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

Commit d3601e56 authored by Cyril Roelandt's avatar Cyril Roelandt Committed by Grant Likely
Browse files

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -290,7 +290,7 @@ static int hspi_probe(struct platform_device *pdev)
	}
	}


	clk = clk_get(NULL, "shyway_clk");
	clk = clk_get(NULL, "shyway_clk");
	if (!clk) {
	if (IS_ERR(clk)) {
		dev_err(&pdev->dev, "shyway_clk is required\n");
		dev_err(&pdev->dev, "shyway_clk is required\n");
		ret = -EINVAL;
		ret = -EINVAL;
		goto error0;
		goto error0;