提交 46e221cb 编写于 作者: S Sachin Kamat 提交者: Jonathan Cameron

staging: iio: tsl2x7x_core: Fix sparse warning

Silences the following warning:
drivers/staging/iio/light/tsl2x7x_core.c:553:70:
warning: Using plain integer as NULL pointer
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Cc: J. August Brenner <jbrenner@taosinc.com>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 8529e667
......@@ -550,7 +550,7 @@ static int tsl2x7x_get_prox(struct iio_dev *indio_dev)
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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册