]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
iio: tcs3472: use ! instead of explicit NULL check
authorAldo Conte <aldocontelk@gmail.com>
Fri, 22 May 2026 12:34:15 +0000 (14:34 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 31 May 2026 10:01:48 +0000 (11:01 +0100)
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>
drivers/iio/light/tcs3472.c

index 8956ed058a2043856fbcc82e401a51567da51fcf..36d3c106e70d260b5f71f7c725383160bc1a1cdd 100644 (file)
@@ -452,7 +452,7 @@ static int tcs3472_probe(struct i2c_client *client)
        int ret;
 
        indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
-       if (indio_dev == NULL)
+       if (!indio_dev)
                return -ENOMEM;
 
        data = iio_priv(indio_dev);