From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751185AbbD3NEy (ORCPT ); Thu, 30 Apr 2015 09:04:54 -0400 Received: from mga09.intel.com ([134.134.136.24]:38874 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750729AbbD3NEw (ORCPT ); Thu, 30 Apr 2015 09:04:52 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,677,1422950400"; d="scan'208";a="487665911" Date: Thu, 30 Apr 2015 21:03:04 +0800 From: kbuild test robot To: Alan Cox Cc: kbuild-all@01.org, Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] i2o: fix simple_return.cocci warnings Message-ID: <20150430130303.GA57164@athens> References: <201504302132.UufsL5Kz%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504302132.UufsL5Kz%fengguang.wu@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- iop.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) --- a/drivers/staging/i2o/iop.c +++ b/drivers/staging/i2o/iop.c @@ -774,11 +774,7 @@ static int i2o_iop_online(struct i2o_con /* 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); }; /**