Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

YueHaibing and committed by
Mark Brown
bfc7af6d 1fc1b636

+1 -1
+1 -1
drivers/spi/spi-bcm2835aux.c
··· 456 456 } 457 457 458 458 bs->clk = devm_clk_get(&pdev->dev, NULL); 459 - if ((!bs->clk) || (IS_ERR(bs->clk))) { 459 + if (IS_ERR(bs->clk)) { 460 460 err = PTR_ERR(bs->clk); 461 461 dev_err(&pdev->dev, "could not get clk: %d\n", err); 462 462 goto out_master_put;