i2o: fix simple_return.cocci warnings

Author: kbuild test robot <fengguang.wu@intel.com>

drivers/staging/i2o/iop.c:777:1-3: WARNING: end returns can be simpified

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci

CC: Alan Cox 
Signed-off-by: Fengguang Wu 
Signed-off-by: Greg Kroah-Hartman 
---
 drivers/staging/i2o/iop.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
 
diff --git a/drivers/staging/i2o/iop.c b/drivers/staging/i2o/iop.c
index c88df55..3c23790 100644
--- a/drivers/staging/i2o/iop.c
+++ b/drivers/staging/i2o/iop.c
@@ -777,11 +777,7 @@ static int i2o_iop_online(struct i2o_controller *c)
 
 	/* In READY state */
 	osm_debug("%s: Attempting to enable...\n", c->name);
-	rc = i2o_iop_enable(c);
-	if (rc)
-		return rc;
-
-	return 0;
+	return i2o_iop_enable(c);
 }
 
 /**
BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.