Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3172812ybi; Fri, 5 Jul 2019 03:08:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyeO7sBnY55OW9T2kjCbt7/ONhKNghnbUsIjRsKk9+2cm3yQmTTf8aJxHrB9nOONTwO5I6q X-Received: by 2002:a63:455c:: with SMTP id u28mr4597878pgk.416.1562321315075; Fri, 05 Jul 2019 03:08:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562321315; cv=none; d=google.com; s=arc-20160816; b=duKFTpYbNASfAqojk7VuGZRUMYESfHeGMZ22/9yGj3as2xu2tJK/N2AUswSt23Rcjj ctAZL78/ceYpSjLQsvdH7TgQ8AroelvRviNeS0naveLFoiEARrCg/Q8uMR2PmFLXRZ38 Z6e2Dmp88ezjd6/gItBfKTh3XUDOwhW0BWZJtWep80Jg2h9/9oAV7dmeM+3NhGEBwMOW GW2vp9WBBwTKVr57yDmHatFTrSRTTMNp+X4ZW6NU/X1C373s33Vxy1c+cmScwBGPAp/D AnrW4OW51UIkQaT41pntoteaeBIQMVsuS9kBClwJlVXUqZZsl3Pp5tbIQJl3DPMXvNGa LP7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=PoD/LNZ3WAuKAbzbfxk+ccktwp+WRdRw3IUZAYLIStA=; b=rJU0yjrA8674nOfJUkVuptUuflw1uAvGWFHQYYBUH7VEu6rXtCQKL1cPrnzkb1oICQ RicWWaN6gXEaF3TgX2HgX4sUla82ea3J934J3Cn33jXGeqemciPSXw3CPIKFL01mPooK DbbKnsSeOM7RBP/E4qABQUnQVa5QVN6Kqk7qnv20QRyquqffLNFTnCmayqAWjdTkli4O gbDarQPPkG/PiqtvvDKxP5z01RkS2nlHNqxTvjsbVa1g7Mu97qXkFJXHtM2CDr4Ulobp obkutFzQKlWq+H8gV3J+2yKIVY9S9aruSxNUnwt7R/Xz8TlP7TlfER4BZtQ+pJi6sVvM DcoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1si8827730pfr.203.2019.07.05.03.08.20; Fri, 05 Jul 2019 03:08:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728357AbfGEKHh (ORCPT + 99 others); Fri, 5 Jul 2019 06:07:37 -0400 Received: from inva021.nxp.com ([92.121.34.21]:48276 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728281AbfGEKHb (ORCPT ); Fri, 5 Jul 2019 06:07:31 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id D6EF7200706; Fri, 5 Jul 2019 12:07:29 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 58AED200044; Fri, 5 Jul 2019 12:07:21 +0200 (CEST) Received: from titan.ap.freescale.net (TITAN.ap.freescale.net [10.192.208.233]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 4B4D240332; Fri, 5 Jul 2019 18:07:11 +0800 (SGT) From: Hou Zhiqiang To: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, bhelgaas@google.com, robh+dt@kernel.org, mark.rutland@arm.com, l.subrahmanya@mobiveil.co.in, shawnguo@kernel.org, leoyang.li@nxp.com, lorenzo.pieralisi@arm.com, catalin.marinas@arm.com, will.deacon@arm.com Cc: Mingkai.Hu@nxp.com, Minghuan.Lian@nxp.com, Xiaowei.Bao@nxp.com, Hou Zhiqiang Subject: [PATCHv6 17/28] PCI: mobiveil: Remove an unnecessary return value check Date: Fri, 5 Jul 2019 17:56:45 +0800 Message-Id: <20190705095656.19191-18-Zhiqiang.Hou@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20190705095656.19191-1-Zhiqiang.Hou@nxp.com> References: <20190705095656.19191-1-Zhiqiang.Hou@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The memory of private structure has been allocated together with the pci_host_bridge structure in function devm_pci_alloc_host_bridge(). So it is unnecessary to check the return value when get the private structure pointer. Signed-off-by: Hou Zhiqiang Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa --- V6: - Splited from #3 of v5 patches, no functional change. drivers/pci/controller/pcie-mobiveil.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index 51cbe53..ddc20d3 100644 --- a/drivers/pci/controller/pcie-mobiveil.c +++ b/drivers/pci/controller/pcie-mobiveil.c @@ -851,8 +851,6 @@ static int mobiveil_pcie_probe(struct platform_device *pdev) return -ENOMEM; pcie = pci_host_bridge_priv(bridge); - if (!pcie) - return -ENOMEM; pcie->pdev = pdev; -- 1.7.1