From: Cristina Moraru Date: Tue, 20 Oct 2015 19:55:47 +0000 (+0300) Subject: staging: iio: magnetometer: Remove explicit comparisons X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=cd857a158abcf2ad0134e9f044ba74b2bd0b468a;p=openwrt%2Fstaging%2Fblogic.git staging: iio: magnetometer: Remove explicit comparisons Remove comparisons to 0 or NULL Signed-off-by: Cristina Moraru Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/magnetometer/hmc5843_core.c b/drivers/staging/iio/magnetometer/hmc5843_core.c index 4aab0228a195..394bc141a1b0 100644 --- a/drivers/staging/iio/magnetometer/hmc5843_core.c +++ b/drivers/staging/iio/magnetometer/hmc5843_core.c @@ -334,7 +334,7 @@ static int hmc5843_get_scale_index(struct hmc5843_data *data, int val, int val2) { int i; - if (val != 0) + if (val) return -EINVAL; for (i = 0; i < data->variant->n_regval_to_nanoscale; i++)