From patchwork Sat Sep 12 23:19:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 7167661 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@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 EBA61BEEC1 for ; Sat, 12 Sep 2015 23:20:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 125C3206AA for ; Sat, 12 Sep 2015 23:20:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2F9F42086F for ; Sat, 12 Sep 2015 23:20:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754890AbbILXUa (ORCPT ); Sat, 12 Sep 2015 19:20:30 -0400 Received: from mail-yk0-f180.google.com ([209.85.160.180]:35414 "EHLO mail-yk0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754642AbbILXUZ (ORCPT ); Sat, 12 Sep 2015 19:20:25 -0400 Received: by ykdu9 with SMTP id u9so124138319ykd.2 for ; Sat, 12 Sep 2015 16:20:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=lTOjruuHhx8LDzePB843lw0FXEKZmY45nSoOcKMkftc=; b=fwUflGUL15GtBRbzgjmNXFS55EigZ7Tm1UP8g4BywZvBdAynKFMt+mByKhdxWN+KBy K5pMlsVZa7JwBnQAy4vc1FHt9Hs/5qxWsRc/ub26eo1Vakw1aKFhh7yoHs9GJtnGBZ3H GSkGN4YJHOxsVQB8+qieFVRyBu1UO9z2iAqnEaUE3CjWdyzhIgDTWH5PsGvTVFG95PmO QW57IkDwIJzzRXW9vTu95BArzu2Gqn39WVDngQkVl930hr5fzVAOWEhgXgSguLbOMzXB iNtSNgQ3yB+4nHKx/WLx6F6Q1v78c6+2/D7m+SN2ijIVr1ouhZnd2rqobvhCvIXrKxH5 GiZw== X-Received: by 10.129.58.10 with SMTP id h10mr5888439ywa.63.1442100024376; Sat, 12 Sep 2015 16:20:24 -0700 (PDT) Received: from localhost.localdomain ([179.159.191.85]) by smtp.gmail.com with ESMTPSA id h131sm4671183ywb.10.2015.09.12.16.20.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 12 Sep 2015 16:20:23 -0700 (PDT) From: Fabio Estevam To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, Fabio Estevam Subject: [PATCH 1/4] hwrng: mxc-rnga - Remove unneeded goto label Date: Sat, 12 Sep 2015 20:19:50 -0300 Message-Id: <1442099993-29449-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 From: Fabio Estevam We can simplify the code by returning the error code immediately instead of jumping to a goto label. Signed-off-by: Fabio Estevam --- drivers/char/hw_random/mxc-rnga.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/char/hw_random/mxc-rnga.c b/drivers/char/hw_random/mxc-rnga.c index 6cbb72e..8803126 100644 --- a/drivers/char/hw_random/mxc-rnga.c +++ b/drivers/char/hw_random/mxc-rnga.c @@ -160,13 +160,12 @@ static int __init mxc_rnga_probe(struct platform_device *pdev) mxc_rng->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(mxc_rng->clk)) { dev_err(&pdev->dev, "Could not get rng_clk!\n"); - err = PTR_ERR(mxc_rng->clk); - goto out; + return PTR_ERR(mxc_rng->clk); } err = clk_prepare_enable(mxc_rng->clk); if (err) - goto out; + return err; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); mxc_rng->mem = devm_ioremap_resource(&pdev->dev, res); @@ -187,8 +186,6 @@ static int __init mxc_rnga_probe(struct platform_device *pdev) err_ioremap: clk_disable_unprepare(mxc_rng->clk); - -out: return err; }