From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Thu, 8 Apr 2010 12:33:45 +0000 (-0300)
Subject: V4L/DVB: ir-core: fix gcc warning noise
X-Git-Tag: firefly_0821_release~9833^2~2094^2~222
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d22e546ea18ee66c255af906f2714d3ee82d4b42;p=firefly-linux-kernel-4.4.55.git

V4L/DVB: ir-core: fix gcc warning noise

drivers/media/IR/ir-sysfs.c: In function ‘store_protocol’:
drivers/media/IR/ir-sysfs.c:93: warning: suggest parentheses around assignment used as truth value

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---

diff --git a/drivers/media/IR/ir-sysfs.c b/drivers/media/IR/ir-sysfs.c
index e47a4f102637..af1edd073b16 100644
--- a/drivers/media/IR/ir-sysfs.c
+++ b/drivers/media/IR/ir-sysfs.c
@@ -91,7 +91,7 @@ static ssize_t store_protocol(struct device *d,
 	unsigned long flags;
 	char *buf;
 
-	while (buf = strsep((char **) &data, " \n")) {
+	while ((buf = strsep((char **) &data, " \n")) != NULL) {
 		if (!strcasecmp(buf, "rc-5") || !strcasecmp(buf, "rc5"))
 			ir_type |= IR_TYPE_RC5;
 		if (!strcasecmp(buf, "pd") || !strcasecmp(buf, "pulse-distance"))