Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1650802pxy; Thu, 6 May 2021 12:20:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgA2xd2gEaksrNdTri9m5BoxoejciTsvqSEaN2Ae0fBhR6FD10o1x+DFX5FYnNIWtFK7ai X-Received: by 2002:a63:eb10:: with SMTP id t16mr6034189pgh.393.1620328833448; Thu, 06 May 2021 12:20:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620328833; cv=none; d=google.com; s=arc-20160816; b=w8zoa0gIaLlm1YHAbjNDDDeYUdTfnaua0RIcfVnMq89VKHSBDf8RALJoAhMfZgKdmv qE3NemK0T+k7Bs+GlugRHfAhnQ3/dX0D0HPzHhtUcFYA26+6KMYTqzQD0nBGghlbquSr akbAbUzCxo3AJgX0mmJRX/AvLQUBd0u2t2ut6HWgqRyLlguL4jULcoBVv5Ub+cFYMUBt 31ov7h8fGli1MkwwP6r6Jjzlk79rizBGR53/4cUKVQ7bBQNvdhu5oIjIGJunywuZAE8/ 5AoMZli5EXjYIuAk0bU60hokSi3FTQYakSw1QqIxewsn6dTLljt4VDgJSBGErhhYuvng /rrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=isWSgWpy4VxIsl7WjbL3aV/x7lVqktXY2l5rzCrHqBs=; b=miRYhdcJtQHmHnijzc+3/1igaPAUMMpathErp1wo2vhWeerMLlfsKH+qknEkJ8IYFK 65CbCtSFeRBOE6gnLPvPspraoKSlsSqtQ6qp+ynsn1ds/bbDF/+RNztVxEVKg3hZXXtB kl87UNUZOS07DS5RZLaDvWcha5LwaSfNFoU+bLr8WoUG+zMcrOE+dNDbhdd/2cekFKEg R8nEc5BNPja2diGj7j2JkuWChMv14UvSOXuAPptYABhOdvjCUnx5TJhl4vnWIWuXd9LT qu2PbydSXroPSMkkzN176SQDy9OK8ELG+svCRD8wAKvUoCod1cQOHRVobvmwzhS0d0M/ Yx5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IcczHnvL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s3si3887797plr.336.2021.05.06.12.20.20; Thu, 06 May 2021 12:20:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IcczHnvL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235602AbhEFPfk (ORCPT + 99 others); Thu, 6 May 2021 11:35:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:45966 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235460AbhEFPdr (ORCPT ); Thu, 6 May 2021 11:33:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 15D12613E3; Thu, 6 May 2021 15:32:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620315169; bh=qGv5xT5gD11qmr1DVmxcsAYsbpUCl4ZOEgFpdd7GuZ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IcczHnvLIHF6Yfx/K/MGhuGZyKTj2egYnSsbv/FT+g6FvPAVLwvBljubTWSu0MLC/ 8cJ5tvUC4mbyvkJlm76qAUB8QGJ6/Eudcc3qTnBMBkv/HRuGb1c3DlG5vGWR1ludqo uLZDbsTHo8YXU9pMepGBdLgGHvji8yxuge/lIi57C24hDVnOadn9S0A2FtuiC67Tk7 H1nnRear0F2QjTLUDwPcBS7Dqd2hqNSIB8+N8z/Y2DAJxvJJDzU/2ZzOvglFPBvDt8 ouxkk52VzJ33d3sj67QQtdVtGTZmuXMyPAmLYGsv/VaFcJn/pbqrcsKjsberwgqd2w RuPj0zexOE0NQ== Received: by pali.im (Postfix) id C357A732; Thu, 6 May 2021 17:32:48 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Lorenzo Pieralisi , Thomas Petazzoni , Rob Herring , Bjorn Helgaas Cc: Russell King , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Remi Pommarel , Xogium , Tomasz Maciej Nowak , Marc Zyngier , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/42] PCI: aardvark: Remove unneeded goto Date: Thu, 6 May 2021 17:31:27 +0200 Message-Id: <20210506153153.30454-17-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210506153153.30454-1-pali@kernel.org> References: <20210506153153.30454-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify advk_pcie_init_irq_domain() function. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- drivers/pci/controller/pci-aardvark.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c index c50421af9d06..366d7480bc1b 100644 --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c @@ -1013,7 +1013,6 @@ static int advk_pcie_init_irq_domain(struct advk_pcie *pcie) struct device_node *node = dev->of_node; struct device_node *pcie_intc_node; struct irq_chip *irq_chip; - int ret = 0; pcie_intc_node = of_get_next_child(node, NULL); if (!pcie_intc_node) { @@ -1029,15 +1028,15 @@ static int advk_pcie_init_irq_domain(struct advk_pcie *pcie) pcie->irq_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, &advk_pcie_irq_domain_ops, pcie); + + of_node_put(pcie_intc_node); + if (!pcie->irq_domain) { dev_err(dev, "Failed to get a INTx IRQ domain\n"); - ret = -ENOMEM; - goto out_put_node; + return -ENOMEM; } -out_put_node: - of_node_put(pcie_intc_node); - return ret; + return 0; } static void advk_pcie_remove_irq_domain(struct advk_pcie *pcie) -- 2.20.1