summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorEva Rachel Retuya <eraretuya@gmail.com>2016-02-27 15:39:22 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-12 09:09:09 +0300
commit4a1e81bc5dbecb28c33851e8e571d2127462910d (patch)
tree8ec07393f8c779a7f2fee670294dffe103410689 /drivers
parent3b7a3dac9204d1f1b5e7c314dbacb372a93b7c99 (diff)
downloadlinux-4a1e81bc5dbecb28c33851e8e571d2127462910d.tar.xz
staging: [media] mn88472: simplify NULL tests
Replace direct comparisons to NULL i.e. 'x == NULL' with '!x' for consistency. Coccinelle semantic patch used: @@ identifier func; expression x; statement Z; @@ x = func(...); if ( ( + ! x - == NULL | + ! - NULL == x ) ) Z Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/media/mn88472/mn88472.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/media/mn88472/mn88472.c b/drivers/staging/media/mn88472/mn88472.c
index c2f2a63ef3ce..7ea749cf19f9 100644
--- a/drivers/staging/media/mn88472/mn88472.c
+++ b/drivers/staging/media/mn88472/mn88472.c
@@ -456,7 +456,7 @@ static int mn88472_probe(struct i2c_client *client,
}
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
- if (dev == NULL) {
+ if (!dev) {
ret = -ENOMEM;
goto err;
}
@@ -483,7 +483,7 @@ static int mn88472_probe(struct i2c_client *client,
* 0x1a and 0x1c, in order to get own I2C client for each register page.
*/
dev->client[1] = i2c_new_dummy(client->adapter, 0x1a);
- if (dev->client[1] == NULL) {
+ if (!dev->client[1]) {
ret = -ENODEV;
dev_err(&client->dev, "I2C registration failed\n");
if (ret)
@@ -497,7 +497,7 @@ static int mn88472_probe(struct i2c_client *client,
i2c_set_clientdata(dev->client[1], dev);
dev->client[2] = i2c_new_dummy(client->adapter, 0x1c);
- if (dev->client[2] == NULL) {
+ if (!dev->client[2]) {
ret = -ENODEV;
dev_err(&client->dev, "2nd I2C registration failed\n");
if (ret)