mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
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>
This commit is contained in:
parent
0e6a62767a
commit
2e84e69c92
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user