From: Shivani Bhardwaj Date: Fri, 16 Oct 2015 13:42:06 +0000 (+0530) Subject: Staging: iio: ad7192: Remove unnecessary NULL test X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3c6b71a503181ccfcbad25f500f18b1253b8a247;p=openwrt%2Fstaging%2Fblogic.git Staging: iio: ad7192: Remove unnecessary NULL test The variable pdata is already NULL tested before so, any further tests should be removed. Signed-off-by: Shivani Bhardwaj Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c index bb760963aa24..5b87049cd3f9 100644 --- a/drivers/staging/iio/adc/ad7192.c +++ b/drivers/staging/iio/adc/ad7192.c @@ -639,7 +639,7 @@ static int ad7192_probe(struct spi_device *spi) voltage_uv = regulator_get_voltage(st->reg); } - if (pdata && pdata->vref_mv) + if (pdata->vref_mv) st->int_vref_mv = pdata->vref_mv; else if (voltage_uv) st->int_vref_mv = voltage_uv / 1000;