diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-01-23 10:05:07 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-01-23 13:31:21 +0300 |
commit | bfc7af6d6df8d75b9c693b8eb98c21aa75c1e377 (patch) | |
tree | cd09b61e8a35d77eeac8c2aee5f70a0f719d516c /drivers/spi/spi-bcm2835aux.c | |
parent | 1fc1b63638da1accb27264a507b23aa6863c3852 (diff) | |
download | linux-bfc7af6d6df8d75b9c693b8eb98c21aa75c1e377.tar.xz |
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>
Diffstat (limited to 'drivers/spi/spi-bcm2835aux.c')
-rw-r--r-- | drivers/spi/spi-bcm2835aux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-bcm2835aux.c b/drivers/spi/spi-bcm2835aux.c index 671e374e1b01..f7e054848ca5 100644 --- a/drivers/spi/spi-bcm2835aux.c +++ b/drivers/spi/spi-bcm2835aux.c @@ -456,7 +456,7 @@ static int bcm2835aux_spi_probe(struct platform_device *pdev) } 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); dev_err(&pdev->dev, "could not get clk: %d\n", err); goto out_master_put; |