From patchwork Sat Feb 24 01:42:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 877381 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BeOpfayc"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="WoDjfJ2J"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zp9nb6qgNz9rxp for ; Sat, 24 Feb 2018 12:42:27 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=xNrOXUHjLWvAT1ayuxREoMEbeFc3MwNTNvVPL+SPdF8=; b=BeO pfaycX7DfqlccwJVD/EPyQz4m+oxn/BS+77oR2w+AUzweglYhVh7uZJ0gaDHXcvOl2vokBlnTfePt TIX9j6qrjUDfgd1ypZ98TWyxRrv/MwgP1g02PFwEiVHo2UucXGKvv7/Gdru1TbKbYsNOuGJ97MQ6s Q6hzmAjIRGycg+HH1WQ/WzXAG3nOOVBWi0daDXuSe35PVzxe/ureYdF5B2qQHhncdf0jLm+MqV2KD WlFJCrqxaenGOMUh/+iVXEUSsIt1htJnj8QrqNhqLuOCtnCItGolApDe0qOpID1gv1ysJkekjy+aP gp25mSEPo4JM+tzMa5tHSWutCrAqnQQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1epOqy-0004Rg-Bl; Sat, 24 Feb 2018 01:42:20 +0000 Received: from mail-vk0-x241.google.com ([2607:f8b0:400c:c05::241]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1epOqu-0004QL-9l for linux-arm-kernel@lists.infradead.org; Sat, 24 Feb 2018 01:42:17 +0000 Received: by mail-vk0-x241.google.com with SMTP id x125so6633203vkc.13 for ; Fri, 23 Feb 2018 17:42:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=PaBJ1kTfm5vUzLUfICQ9My8BbblKNXk6paVMIqFhZkg=; b=WoDjfJ2JK5CQJEpENmVUA0nCEpo6uZ0uXUMauh1E2pwx5pwLzmFziuFI2NDYG+0/NE mibSrhXgtDtDJgh72oK3QGCSpKpRG3rqW9K+5nobasbRelNVo2M1uPhmq8FtgJmc9jPc J9kE54WSnCgOjHFjdmVxfdVuFI1H8cJ57SrUwfVSx629XcSt6qqUVPXYHmh9NEejSC4o EfO56mVswk33I67Jp+S56XldiA+Lb0l3xSaWUNDyD+hVwgJKdAXJW/Dse97Dgu6hi7TP WcnNIiYM2SpTwfN23kOn/IHKXxHFd8LvJmW5CJM+45NThBJpZlBG+Stj2TjYLest8ORo RkNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=PaBJ1kTfm5vUzLUfICQ9My8BbblKNXk6paVMIqFhZkg=; b=Nha/8LUYn/HvaHXzOtYKfU+769qOQlRF9tOcOKuSeOP9zDXMOElPd7FLVpyzKI862C K9wrBEdJV6gblbZDkKNFbUsLKGAkArDJCgje1Im/qDjmYMjWqULkEXPTgKnQ9/byVoF+ fx/1QbLV35Rekav44tTMX/XjE1Z0htt8tL2oCoflM8+gQlO1ceCz7XHnkZCzVa+JZSmk 5FCOOcQw5F3yc/lvwX+HE9OV+duBCYkQsk49kuA9OXODUb0PAJfbOsuMx9NqApxGBZNb KhyO6yCXJBGPahGhBi9cQUYtuYlLNlizJ1ksAeKlbp6jJd70dogcFJBlagnf2RTqf4uk 9NtA== X-Gm-Message-State: APf1xPBF7ACBAjzOUzFUMwBwuXnFzboqPhWTqSSDT72OYYO3erSl2ECy x3TrpMPksLA885x2XBPwSFU= X-Google-Smtp-Source: AG47ELsImekNbyqvQPa0rGXX+R5vnjnNaMUbtRLovtB/7SDeC/kuNgCDb209/fipQao5rINNXYBTzA== X-Received: by 10.31.3.102 with SMTP id 99mr2755531vkd.124.1519436522825; Fri, 23 Feb 2018 17:42:02 -0800 (PST) Received: from localhost.localdomain ([187.180.181.19]) by smtp.gmail.com with ESMTPSA id b7sm4971004uag.51.2018.02.23.17.42.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 23 Feb 2018 17:42:02 -0800 (PST) From: Fabio Estevam To: shawnguo@kernel.org Subject: [PATCH] ARM: imx: pm-imx6: Return the error directly Date: Fri, 23 Feb 2018 22:42:04 -0300 Message-Id: <1519436524-24583-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180223_174216_387806_8A6931E8 X-CRM114-Status: GOOD ( 12.73 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400c:c05:0:0:0:241 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (festevam[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabio Estevam , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org From: Fabio Estevam Simplify the error path by returning the error code directly rather than jumping to a label. Signed-off-by: Fabio Estevam --- arch/arm/mach-imx/pm-imx6.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c index ecdf071..017539d 100644 --- a/arch/arm/mach-imx/pm-imx6.c +++ b/arch/arm/mach-imx/pm-imx6.c @@ -428,10 +428,8 @@ static int __init imx6_pm_get_base(struct imx6_pm_base *base, int ret = 0; node = of_find_compatible_node(NULL, NULL, compat); - if (!node) { - ret = -ENODEV; - goto out; - } + if (!node) + return -ENODEV; ret = of_address_to_resource(node, 0, &res); if (ret) @@ -444,7 +442,6 @@ static int __init imx6_pm_get_base(struct imx6_pm_base *base, put_node: of_node_put(node); -out: return ret; }