* [PATCH] Staging: iio: ad7192: Remove unnecessary NULL test
@ 2015-10-16 13:42 Shivani Bhardwaj
0 siblings, 0 replies; only message in thread
From: Shivani Bhardwaj @ 2015-10-16 13:42 UTC (permalink / raw)
To: outreachy-kernel
The variable pdata is already NULL tested before so, any further tests
should be removed.
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
---
drivers/staging/iio/adc/ad7192.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c
index fe56fb6..7213d2e 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;
--
2.1.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-10-16 13:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-16 13:42 [PATCH] Staging: iio: ad7192: Remove unnecessary NULL test Shivani Bhardwaj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.