Skip to content

Commit 2e84e69

Browse files
aldocontelkjic23
authored andcommitted
iio: tcs3472: use ! instead of explicit NULL check
Replace 'if (indio_dev == NULL)' with 'if (!indio_dev)' in tcs3472_probe() to follow the preferred kernel style. No functional change. Suggested-by: Joshua Crofts <joshua.crofts1@gmail.com> Signed-off-by: Aldo Conte <aldocontelk@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent 0e6a627 commit 2e84e69

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/iio/light/tcs3472.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ static int tcs3472_probe(struct i2c_client *client)
452452
int ret;
453453

454454
indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
455-
if (indio_dev == NULL)
455+
if (!indio_dev)
456456
return -ENOMEM;
457457

458458
data = iio_priv(indio_dev);

0 commit comments

Comments
 (0)