Commit bfc7af6d authored by YueHaibing's avatar YueHaibing Committed by Mark Brown

spi: bcm2835aux: remove unneeded NULL check of devm_clk_get

Fix a static code checker warning:
drivers/spi/spi-bcm2835aux.c:460
 bcm2835aux_spi_probe() warn: passing zero to 'PTR_ERR'

In case of error, the function devm_clk_get() returns ERR_PTR()
and not returns NULL.
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1fc1b636
...@@ -456,7 +456,7 @@ static int bcm2835aux_spi_probe(struct platform_device *pdev) ...@@ -456,7 +456,7 @@ static int bcm2835aux_spi_probe(struct platform_device *pdev)
} }
bs->clk = devm_clk_get(&pdev->dev, NULL); bs->clk = devm_clk_get(&pdev->dev, NULL);
if ((!bs->clk) || (IS_ERR(bs->clk))) { if (IS_ERR(bs->clk)) {
err = PTR_ERR(bs->clk); err = PTR_ERR(bs->clk);
dev_err(&pdev->dev, "could not get clk: %d\n", err); dev_err(&pdev->dev, "could not get clk: %d\n", err);
goto out_master_put; goto out_master_put;
......
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