All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: i2o: Remove assignment in if condition
@ 2015-02-18 19:01 Vatika Harlalka
  2015-02-18 20:04 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 2+ messages in thread
From: Vatika Harlalka @ 2015-02-18 19:01 UTC (permalink / raw)
  To: outreachy-kernel

This patch removes the assignment in an if condition to do away with
the checkpatch warning :'do not use assignment in if condition'.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
---
 drivers/staging/i2o/bus-osm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/i2o/bus-osm.c b/drivers/staging/i2o/bus-osm.c
index 7aa0339..70b15b2 100644
--- a/drivers/staging/i2o/bus-osm.c
+++ b/drivers/staging/i2o/bus-osm.c
@@ -67,9 +67,9 @@ static ssize_t i2o_bus_store_scan(struct device *d,
 				  const char *buf, size_t count)
 {
 	struct i2o_device *i2o_dev = to_i2o_device(d);
-	int rc;
+	int rc = i2o_bus_scan(i2o_dev);
 
-	if ((rc = i2o_bus_scan(i2o_dev)))
+	if (rc)
 		osm_warn("bus scan failed %d\n", rc);
 
 	return count;
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-18 20:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-18 19:01 [PATCH] Staging: i2o: Remove assignment in if condition Vatika Harlalka
2015-02-18 20:04 ` [Outreachy kernel] " Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.