staging: iio: magnetometer: Remove explicit comparisons
authorCristina Moraru <cristina.moraru09@gmail.com>
Tue, 20 Oct 2015 19:55:47 +0000 (22:55 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Oct 2015 02:32:09 +0000 (19:32 -0700)
Remove comparisons to 0 or NULL

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/magnetometer/hmc5843_core.c

index 4aab0228a1955ac9a3f095dd585370b44861db16..394bc141a1b0c01f3ebb8177092749c22afc628b 100644 (file)
@@ -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++)