Skip to contentSkip to conversation

Staging: iio: ad7192: Remove unnecessary NULL test

PATCH New Shivani Bhardwaj 1 participant 1 message Oct 16, 2015

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: iio: ad7192: Remove unnecessary NULL test

The variable pdata is already NULL tested before so, any further tests should be removed.

---
 drivers/staging/iio/adc/ad7192.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/adc/ad7192.c +1 -1
index fe56fb6..7213d2e 100644
@@ -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;
Signature · 1 line
2.1.0