staging: iio: tsl2x7x_core: Fix sparse warning
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 5 Sep 2013 09:29:00 +0000 (10:29 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 7 Sep 2013 21:07:04 +0000 (22:07 +0100)
Silences the following warning:
drivers/staging/iio/light/tsl2x7x_core.c:553:70:
warning: Using plain integer as NULL pointer

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: J. August Brenner <jbrenner@taosinc.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/light/tsl2x7x_core.c

index aa867258516fd4e44df0646b2e55b5ea2b7256fa..3439d378efbfc6fee8e78f8a6d0885a9a4c72409 100644 (file)
@@ -550,7 +550,7 @@ prox_poll_err:
 static void tsl2x7x_defaults(struct tsl2X7X_chip *chip)
 {
        /* If Operational settings defined elsewhere.. */
-       if (chip->pdata && chip->pdata->platform_default_settings != 0)
+       if (chip->pdata && chip->pdata->platform_default_settings)
                memcpy(&(chip->tsl2x7x_settings),
                        chip->pdata->platform_default_settings,
                        sizeof(tsl2x7x_default_settings));