linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] spi: bcm2835aux: remove unneeded NULL check of devm_clk_get
@ 2019-01-23  7:05 YueHaibing
  2019-01-23 16:16 ` Stefan Wahren
  2019-01-23 17:58 ` Applied "spi: bcm2835aux: remove unneeded NULL check of devm_clk_get" to the spi tree Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2019-01-23  7:05 UTC (permalink / raw)
  To: broonie, eric, stefan.wahren, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list
  Cc: linux-kernel, linux-arm-kernel, linux-rpi-kernel, linux-spi, YueHaibing

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>
---
 drivers/spi/spi-bcm2835aux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-bcm2835aux.c b/drivers/spi/spi-bcm2835aux.c
index 671e374..f7e0548 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;
-- 
2.7.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] spi: bcm2835aux: remove unneeded NULL check of devm_clk_get
  2019-01-23  7:05 [PATCH -next] spi: bcm2835aux: remove unneeded NULL check of devm_clk_get YueHaibing
@ 2019-01-23 16:16 ` Stefan Wahren
  2019-01-23 17:58 ` Applied "spi: bcm2835aux: remove unneeded NULL check of devm_clk_get" to the spi tree Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Wahren @ 2019-01-23 16:16 UTC (permalink / raw)
  To: YueHaibing, broonie, eric, f.fainelli, rjui, sbranden,
	bcm-kernel-feedback-list
  Cc: linux-spi, linux-kernel, linux-arm-kernel, linux-rpi-kernel

> YueHaibing <yuehaibing@huawei.com> hat am 23. Januar 2019 um 08:05 geschrieben:
> 
> 
> 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>

Acked-by: Stefan Wahren <stefan.wahren@i2se.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Applied "spi: bcm2835aux: remove unneeded NULL check of devm_clk_get" to the spi tree
  2019-01-23  7:05 [PATCH -next] spi: bcm2835aux: remove unneeded NULL check of devm_clk_get YueHaibing
  2019-01-23 16:16 ` Stefan Wahren
@ 2019-01-23 17:58 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2019-01-23 17:58 UTC (permalink / raw)
  To: YueHaibing
  Cc: Mark Brown, broonie, eric, stefan.wahren, f.fainelli, rjui,
	sbranden, bcm-kernel-feedback-list, linux-kernel,
	linux-arm-kernel, linux-rpi-kernel, linux-spi, linux-spi

The patch

   spi: bcm2835aux: remove unneeded NULL check of devm_clk_get

has been applied to the spi tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From bfc7af6d6df8d75b9c693b8eb98c21aa75c1e377 Mon Sep 17 00:00:00 2001
From: YueHaibing <yuehaibing@huawei.com>
Date: Wed, 23 Jan 2019 15:05:07 +0800
Subject: [PATCH] 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>
---
 drivers/spi/spi-bcm2835aux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-23 17:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-23  7:05 [PATCH -next] spi: bcm2835aux: remove unneeded NULL check of devm_clk_get YueHaibing
2019-01-23 16:16 ` Stefan Wahren
2019-01-23 17:58 ` Applied "spi: bcm2835aux: remove unneeded NULL check of devm_clk_get" to the spi tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).