From patchwork Sat Oct 3 21:02:30 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: 7322581 Return-Path: X-Original-To: patchwork-linux-arm@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 772E6BEEA4 for ; Sat, 3 Oct 2015 21:08:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A8D5D20766 for ; Sat, 3 Oct 2015 21:08:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A3BE520761 for ; Sat, 3 Oct 2015 21:08:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZiTzC-0001SX-ES; Sat, 03 Oct 2015 21:04:54 +0000 Received: from mga03.intel.com ([134.134.136.65]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZiTzA-0001PP-8K for linux-arm-kernel@lists.infradead.org; Sat, 03 Oct 2015 21:04:52 +0000 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 03 Oct 2015 14:04:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,630,1437462000"; d="scan'208";a="573544707" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by FMSMGA003.fm.intel.com with ESMTP; 03 Oct 2015 14:04:28 -0700 Received: from kbuild by bee with local (Exim 4.83) (envelope-from ) id 1ZiTya-000Tkb-NC; Sun, 04 Oct 2015 05:04:16 +0800 Date: Sun, 4 Oct 2015 05:02:30 +0800 From: kbuild test robot To: Daniel Thompson Subject: [PATCH] hwrng: fix simple_return.cocci warnings Message-ID: <20151003210230.GA71026@lkp-hsx03> References: <201510040505.eDq0KS9w%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1443904519-24012-3-git-send-email-daniel.thompson@linaro.org> 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151003_140452_321980_E2BF2D7A X-CRM114-Status: GOOD ( 11.15 ) X-Spam-Score: -6.9 (------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Daniel Thompson , linaro-kernel@lists.linaro.org, Herbert Xu , Pawel Moll , patches@linaro.org, Ian Campbell , linux-kernel@vger.kernel.org, Rob Herring , kbuild-all@01.org, Maxime Coquelin , Matt Mackall , Kumar Gala , linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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/char/hw_random/stm32-rng.c:164:1-4: 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: Daniel Thompson Signed-off-by: Fengguang Wu --- stm32-rng.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) --- a/drivers/char/hw_random/stm32-rng.c +++ b/drivers/char/hw_random/stm32-rng.c @@ -161,11 +161,7 @@ static int stm32_rng_probe(struct platfo priv->rng.read = stm32_rng_read, priv->rng.priv = (unsigned long) dev; - err = hwrng_register(&priv->rng); - if (err) - return err; - - return 0; + return hwrng_register(&priv->rng); } static const struct of_device_id stm32_rng_match[] = {