linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IIO: ADC: stm32-dfsdm: fix static check warning
@ 2018-01-15  9:00 Arnaud Pouliquen
  2018-01-15 11:32 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Arnaud Pouliquen @ 2018-01-15  9:00 UTC (permalink / raw)
  To: Jonathan Cameron, Robin Murphy, Arnd Bergmann, Mark Brown,
	Lars-Peter Clausen, Peter Meerwald-Stadler
  Cc: linux-iio, linux-arm-kernel, Maxime Coquelin, Hartmut Knaack,
	Alexandre Torgue, arnaud.pouliquen

iio_priv does not return an error pointer, so check is not valid.
Patch suppresses it.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
---
 drivers/iio/adc/stm32-dfsdm-adc.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/iio/adc/stm32-dfsdm-adc.c b/drivers/iio/adc/stm32-dfsdm-adc.c
index f79a90f..5c67236 100644
--- a/drivers/iio/adc/stm32-dfsdm-adc.c
+++ b/drivers/iio/adc/stm32-dfsdm-adc.c
@@ -1099,10 +1099,6 @@ static int stm32_dfsdm_adc_probe(struct platform_device *pdev)
 	}
 
 	adc = iio_priv(iio);
-	if (IS_ERR(adc)) {
-		dev_err(dev, "%s: Failed to allocate ADC\n", __func__);
-		return PTR_ERR(adc);
-	}
 	adc->dfsdm = dev_get_drvdata(dev->parent);
 
 	iio->dev.parent = dev;
-- 
2.7.4

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

end of thread, other threads:[~2018-01-15 11:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-15  9:00 [PATCH] IIO: ADC: stm32-dfsdm: fix static check warning Arnaud Pouliquen
2018-01-15 11:32 ` Jonathan Cameron

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).