From patchwork Sat Oct 10 12:24:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kernel test robot X-Patchwork-Id: 528619 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id EEAD21402D8 for ; Sat, 10 Oct 2015 23:26:07 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751888AbbJJM0E (ORCPT ); Sat, 10 Oct 2015 08:26:04 -0400 Received: from mga02.intel.com ([134.134.136.20]:52469 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751874AbbJJM0D (ORCPT ); Sat, 10 Oct 2015 08:26:03 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 10 Oct 2015 05:26:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,663,1437462000"; d="scan'208";a="807905430" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by fmsmga001.fm.intel.com with ESMTP; 10 Oct 2015 05:26:02 -0700 Received: from kbuild by bee with local (Exim 4.83) (envelope-from ) id 1ZktDg-0000KI-Ry; Sat, 10 Oct 2015 20:25:48 +0800 Date: Sat, 10 Oct 2015 20:24:22 +0800 From: kbuild test robot To: Michael Chan Cc: kbuild-all@01.org, davem@davemloft.net, netdev@vger.kernel.org Subject: [PATCH] bnxt_en: fix simple_return.cocci warnings Message-ID: <20151010122422.GA58821@ivytown2> References: <201510102046.oAPUHudL%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1444477151-2225-1-git-send-email-mchan@broadcom.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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org drivers/net/ethernet/broadcom/bnxt/bnxt.c:4071:1-3: WARNING: end returns can be simpified and declaration on line 4064 can be dropped Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci CC: Michael Chan Signed-off-by: Fengguang Wu --- bnxt.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -4061,18 +4061,12 @@ static int bnxt_shutdown_nic(struct bnxt static int bnxt_init_nic(struct bnxt *bp, bool irq_re_init) { - int rc; - bnxt_init_rx_rings(bp); bnxt_init_tx_rings(bp); bnxt_init_ring_grps(bp, irq_re_init); bnxt_init_vnics(bp); - rc = bnxt_init_chip(bp, irq_re_init); - if (rc) - return rc; - - return 0; + return bnxt_init_chip(bp, irq_re_init); } static void bnxt_disable_int(struct bnxt *bp)