From patchwork Sun Jan 25 07:24:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 5700641 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 28F23C058D for ; Sun, 25 Jan 2015 07:25:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB1BD201FB for ; Sun, 25 Jan 2015 07:25:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 15F32201F5 for ; Sun, 25 Jan 2015 07:25:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A892089FAC; Sat, 24 Jan 2015 23:25:15 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id CF5BB89FAC for ; Sat, 24 Jan 2015 23:25:13 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 24 Jan 2015 23:25:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,463,1418112000"; d="scan'208";a="675565064" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga002.jf.intel.com with ESMTP; 24 Jan 2015 23:25:01 -0800 Received: from kbuild by bee with local (Exim 4.83) (envelope-from ) id 1YFHZ5-000Epi-I0; Sun, 25 Jan 2015 15:24:59 +0800 Date: Sun, 25 Jan 2015 15:24:23 +0800 From: kbuild test robot To: Martin Peres Subject: [PATCH] drm/nouveau/subdev: fix simple_return.cocci warnings Message-ID: <20150125072423.GA23059@waimea> References: <201501251512.MZS5lyNx%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201501251512.MZS5lyNx%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 Cc: linux-kernel@vger.kernel.org, kbuild-all@01.org, dri-devel@lists.freedesktop.org, Ben Skeggs X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP drivers/gpu/drm/nouveau/core/subdev/fuse/gm107.c:50:5-8: 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: Martin Peres Signed-off-by: Fengguang Wu --- gm107.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/gpu/drm/nouveau/core/subdev/fuse/gm107.c +++ b/drivers/gpu/drm/nouveau/core/subdev/fuse/gm107.c @@ -47,10 +47,7 @@ gm107_fuse_ctor(struct nouveau_object *p ret = nouveau_fuse_create(parent, engine, oclass, &priv); *pobject = nv_object(priv); - if (ret) - return ret; - - return 0; + return ret; } struct nouveau_oclass