Skip to contentSkip to conversation

staging: greybus: bundle.c fix comparison to NULL

PATCH In review Dominik Adamski 2 participants 2 messages Mar 4, 2019 – Mar 17, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: greybus: bundle.c fix comparison to NULL

Fix checkpatch issue:
Comparison to NULL could be written "!bundle->state"

---
 drivers/staging/greybus/bundle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/bundle.c +1 -1
index e97b2b87ba47..3f702db9e098 100644
@@ -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);
Signature · 1 line
2.19.1
#1 lore raw
Quoted 13 lines · Dominik Adamski

Fix checkpatch issue:
Comparison to NULL could be written "!bundle->state"

---
 drivers/staging/greybus/bundle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/bundle.c +0 -0
index e97b2b87ba47..3f702db9e098 100644

drivers/staging/greybus/bundle.c static ssize_t state_show(struct device *dev, struct device_attribute *attr, · line 38

Quoted 8 lines
drivers/staging/greybus/bundle.c +1 -1
@@ -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);

This does not apply to my tree, please rebase and resend.

thanks,

greg k-h