staging: greybus: Change NULL comparison to Boolean Negation
authorNishka Dasgupta <nishka.dasgupta@yahoo.com>
Mon, 4 Mar 2019 17:43:15 +0000 (23:13 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Mar 2019 06:05:18 +0000 (07:05 +0100)
Change NULL comparison to boolean negation. Issue found by Checkpatch.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/bundle.c

index e97b2b8..376ca53 100644 (file)
@@ -32,7 +32,7 @@ static ssize_t state_show(struct device *dev, struct device_attribute *attr,
 {
        struct gb_bundle *bundle = to_gb_bundle(dev);
 
-       if (bundle->state == NULL)
+       if (!(bundle->state))
                return sprintf(buf, "\n");
 
        return sprintf(buf, "%s\n", bundle->state);