From 41d98f584f03660324f078fd812342a1e75edd6d Mon Sep 17 00:00:00 2001 From: kbuild test robot Date: Thu, 30 Apr 2015 21:03:04 +0800 Subject: [PATCH] i2o: fix simple_return.cocci warnings 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 c88df551bbb0..3c2379097586 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); } /** -- 2.20.1