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: 7322571 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 433799F1B9 for ; Sat, 3 Oct 2015 21:05:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 86C6B2075A for ; Sat, 3 Oct 2015 21:05:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 995552074A for ; Sat, 3 Oct 2015 21:05:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751237AbbJCVFC (ORCPT ); Sat, 3 Oct 2015 17:05:02 -0400 Received: from mga03.intel.com ([134.134.136.65]:30488 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751152AbbJCVEb (ORCPT ); Sat, 3 Oct 2015 17:04:31 -0400 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 Cc: kbuild-all@01.org, Matt Mackall , Herbert Xu , Daniel Thompson , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, patches@linaro.org, linaro-kernel@lists.linaro.org, Maxime Coquelin , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala 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 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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[] = {