[PATCH] staging: greybus: bundle.c fix comparison to NULL

Dominik Adamski adamski.dominik at gmail.com
Mon Mar 4 17:06:36 UTC 2019


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

Signed-off-by: Dominik Adamski <adamski.dominik at gmail.com>
---
 drivers/staging/greybus/bundle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/bundle.c b/drivers/staging/greybus/bundle.c
index e97b2b87ba47..3f702db9e098 100644
--- a/drivers/staging/greybus/bundle.c
+++ b/drivers/staging/greybus/bundle.c
@@ -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);
-- 
2.19.1



More information about the devel mailing list