Browse Source

IIO: ADC: stm32-dfsdm: fix static check warning

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>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Arnaud Pouliquen 7 years ago
parent
commit
1175d0f9f4
1 changed files with 0 additions and 4 deletions
  1. 0 4
      drivers/iio/adc/stm32-dfsdm-adc.c

+ 0 - 4
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);
 	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);
 	adc->dfsdm = dev_get_drvdata(dev->parent);
 
 
 	iio->dev.parent = dev;
 	iio->dev.parent = dev;