Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3025889pxj; Mon, 17 May 2021 15:54:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfxfEoDCPxyINUvLY3jP3KhToHTAt3vZDmisdMih4aew7cFbOiNm21YgehQ9oao1PrvE1B X-Received: by 2002:a05:6638:10c4:: with SMTP id q4mr2278663jad.29.1621292082891; Mon, 17 May 2021 15:54:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621292082; cv=none; d=google.com; s=arc-20160816; b=iWimwTjpSzJerC7hFcwg9TgSb2/B+X+A6VSyqoxeR5tfYXix208La5Vz+jkdcm+gCt BCZ4o7WeNs7hi4o5ymb61oOXVf9FULUv4EToql2DGsTDPv0vWHG/P0zC3Ic4eAccOZCk lq5Sidy6NNv2Ar4WFx48jj0SYV4wzqeInN5qCQpt9tk0hKD5gBI/KDxuEiOtJMbRsBMk nfgYo9uSQsth1RZ+JosCzpki5CqBy0xbMd44nDREEyF/eZ8mtm1xINXibvQAfcc4iaz2 KynlAUVe/s67TpV71ROeFJ85sLUydslgkbltxZoA1dFKrcSpaOsmw3ARgDrXtKhr+z5E cIxA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=t3b77WX1TZOTRt9o8oZHzwRul/IcXkvZ8WqPOfzRHKU=; b=PfcLNOzuulw94vehXR82dWiBkZ88vIh83TceGQ+Q+2UbJfTsE6+Agm2Libf5JQjN6F kfQdnDeTCYYDHSqf+7cRE3uMEMwl9RC10MRS7Le8BVq34OKrkwkIqkK5GLta98vPYVOA aQ64TXMukO6dmjpQwme/tzbW3Ef3JuYmko3nXdUTHu9LQXiELEIWwefyCvrdllWroJ3m d+y51zukdxNqz7iFvwmK3EZRFdpn66zDSrDega9or+IzSnh3AcYx4ppqCIf3PXCvFNRw twIvly8UFk96LW98AG7cTK+fk5+p7Q488mLt3Akc2XMbMaT6XQ8oZsBanIds7si7h4Be HQqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hVkFBJiy; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d9si8389546ils.122.2021.05.17.15.54.05; Mon, 17 May 2021 15:54:42 -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=@linuxfoundation.org header.s=korg header.b=hVkFBJiy; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238979AbhEQORh (ORCPT + 99 others); Mon, 17 May 2021 10:17:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:47270 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239049AbhEQOOu (ORCPT ); Mon, 17 May 2021 10:14:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EC23B613ED; Mon, 17 May 2021 14:09:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260557; bh=WEzSxR3LYmg8uei0Xm7ZiJWB/DnMKejsL2tNj8d4wK4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hVkFBJiytH5I6C2tLWL691OsW4vmif7ty6b6I3NkrbyvQwg5ED0WKPh4hoa/SDn1h kGbedZ8Nj3YQrq3KpEWDQeXnSm6wBLSTrAqW48Lt6/+7pvh/h3+c1CJR9qKWlDTAvw PYLJZTi9eqfJxpCjZJCc8/vOkVZyK3Y0ElzN1GzY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Wei Yongjun , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Florian Fainelli , Sasha Levin Subject: [PATCH 5.12 134/363] PCI: brcmstb: Fix error return code in brcm_pcie_probe() Date: Mon, 17 May 2021 16:00:00 +0200 Message-Id: <20210517140307.147277690@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Wei Yongjun [ Upstream commit b5d9209d50838474fc1b2901d0e11bba59906428 ] Fix to return negative error code -ENODEV from the unsupported revision error handling case instead of 0, as done elsewhere in this function. Link: https://lore.kernel.org/r/20210308135619.19133-1-weiyongjun1@huawei.com Fixes: 0cdfaceb9889 ("PCI: brcmstb: support BCM4908 with external PERST# signal controller") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof WilczyƄski Acked-by: Florian Fainelli Signed-off-by: Sasha Levin --- drivers/pci/controller/pcie-brcmstb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index e330e6811f0b..69c999222cc8 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -1296,6 +1296,7 @@ static int brcm_pcie_probe(struct platform_device *pdev) pcie->hw_rev = readl(pcie->base + PCIE_MISC_REVISION); if (pcie->type == BCM4908 && pcie->hw_rev >= BRCM_PCIE_HW_REV_3_20) { dev_err(pcie->dev, "hardware revision with unsupported PERST# setup\n"); + ret = -ENODEV; goto fail; } -- 2.30.2