Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4944601rwl; Mon, 10 Apr 2023 20:41:28 -0700 (PDT) X-Google-Smtp-Source: AKy350YkRTJ5Ps7LHZCRqqAjgrNJkq49POVg7TnQ/8jvzMwBijGC82OYgqCuQeB8vJnbntTiGlZU X-Received: by 2002:a17:906:139b:b0:94a:6c9c:77ba with SMTP id f27-20020a170906139b00b0094a6c9c77bamr1082788ejc.58.1681184488569; Mon, 10 Apr 2023 20:41:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681184488; cv=none; d=google.com; s=arc-20160816; b=Jjl5a/noxhua0e/jrfM7fiz4PbdqmCNnC00lTTgVP3dIvc7sCfEDaG9OxugT/BGyXz e9m+X7SmHbaWpzLjXHxJ8q90ZaObrtkMMXeV+grGI1inQXGJiUE5RdH4Co+U3Ks8tati ZynTSwmSQ0Y/fnnmYOxsUfIebPag72MjOv7SJ6y1PFgK3i9RKphnVTCyd1MOPqTg6mxP 83xvKGIDx2IVESnBnvvzezvAWcZqlEOblcEq7EDh2jwg98FcNcg62NsIpcBgQPStszy2 3qtu1Z4hysdJLhutWHnTSu462HMgfQeINmikZFfJNz2yYjsqjIMEgGwzoMZzpyEB1H/O vKNQ== 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=Z8ARZK5us9oFqxpICK2v9G6GBNtg+a64/s6Q6MnxyS4=; b=aESOKHdiSFBWub8shHUE/2nAR+HdsLaJfuau7Mr0DFySkfPoKZNoRpVtZOb7qgZq/d NrnID81n1GbbFOUVZPFUOINn28MZagXW2dnICpHeFoKCxGsLjRDyLcDKZoPm2A1/KFoX HVzlvys+I5IBa0ekJw5bxpOFVwX8pXzAeuJJn4m+zmtjz4XzV3PP5SlPrz9SLREvNM7s 8MiZq5qiGxOYeH89Jpw5O6HQ9KemKIH4UkmQHNrAqizikM4BMYTYB9feKEZm/rpR6I8B NNojMCGZQALKuEm/l5Tpagd8q2C8UuuzofjN8rpfv77qmMfeA9BqLytn9EJ5+nf1wNDt PkSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baikalelectronics.ru header.s=post header.b=C8gQ94Le; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=baikalelectronics.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s6-20020aa7c546000000b004bf5450d536si10525734edr.160.2023.04.10.20.41.02; Mon, 10 Apr 2023 20:41:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@baikalelectronics.ru header.s=post header.b=C8gQ94Le; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=baikalelectronics.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229980AbjDKDj7 (ORCPT + 99 others); Mon, 10 Apr 2023 23:39:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229906AbjDKDjv (ORCPT ); Mon, 10 Apr 2023 23:39:51 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A66DD1FC1; Mon, 10 Apr 2023 20:39:48 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 8BF84E0EAD; Tue, 11 Apr 2023 06:39:47 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=Z8ARZK5us9oFqxpICK2v9G6GBNtg+a64/s6Q6MnxyS4=; b=C8gQ94LeATaY tEzzOmlYSTbqSxW1IudWdE9FB8wyTrSW1NFFhgJ8EGunnV/LNrHt5efTVTHyZkx0 cYPX5S3kXkUl6x3/AsRhuyKC3W2/iNZX1wh5YDPG1E7Vf32RkiJaPTTN6Tauxuq1 YWys3mE1Jt/LZkl1ZGVG4l7dDgPhO30= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id 69494E0E6A; Tue, 11 Apr 2023 06:39:47 +0300 (MSK) Received: from localhost (10.8.30.38) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 11 Apr 2023 06:39:47 +0300 From: Serge Semin To: Bjorn Helgaas , Lorenzo Pieralisi , Cai Huoqing , Jingoo Han , Gustavo Pimentel , Vinod Koul , Manivannan Sadhasivam , Yoshihiro Shimoda , Rob Herring , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , , , Subject: [PATCH RESEND v3 04/10] PCI: bt1: Fix printing false error message Date: Tue, 11 Apr 2023 06:39:22 +0300 Message-ID: <20230411033928.30397-5-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230411033928.30397-1-Sergey.Semin@baikalelectronics.ru> References: <20230411033928.30397-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.8.30.38] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The dev_err_probe() method is supposed to be invoked only if any error is happened. It was definitely wrong to call it unconditionally. Due to that the DWC PCIe host initialization error-message is printed all the time the Baikal-T1 PCIe controller is probed even if no error actually happened. Fixes: ba6ed462dcf4 ("PCI: dwc: Add Baikal-T1 PCIe controller support") Signed-off-by: Serge Semin --- drivers/pci/controller/dwc/pcie-bt1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pcie-bt1.c b/drivers/pci/controller/dwc/pcie-bt1.c index e36a20bf82cf..6557141873ad 100644 --- a/drivers/pci/controller/dwc/pcie-bt1.c +++ b/drivers/pci/controller/dwc/pcie-bt1.c @@ -597,8 +597,10 @@ static int bt1_pcie_add_port(struct bt1_pcie *btpci) dw_pcie_cap_set(&btpci->dw, REQ_RES); ret = dw_pcie_host_init(&btpci->dw.pp); + if (ret) + dev_err_probe(dev, ret, "Failed to initialize DWC PCIe host\n"); - return dev_err_probe(dev, ret, "Failed to initialize DWC PCIe host\n"); + return ret; } static void bt1_pcie_del_port(struct bt1_pcie *btpci) -- 2.40.0