Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4706095rwd; Sun, 11 Jun 2023 13:17:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4uRkAR/goyxhgSUv1sW6CWsfSMWOMzEBqMobflEXe8dvCYgJVCLgHyP7yc+xHADn6L/YfO X-Received: by 2002:a17:907:7242:b0:97b:6c24:8d2b with SMTP id ds2-20020a170907724200b0097b6c248d2bmr7785948ejc.55.1686514643398; Sun, 11 Jun 2023 13:17:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686514643; cv=none; d=google.com; s=arc-20160816; b=bhkvHN0zd7VG9Caf2IbDd6K0ecDN0a3Y3kkpqhcQfnBkv7aVq59IncFpnISXhaaaoA a7P0sUtVKNVAACYssnU/HP9pbM1r069DkmvOLebt/dwQVgMuDpxnbEPUO/9Ya00VC44z 0VkGZHvccv9E+8aghBmZ0bb4s8Uk/3kbXyJJv9GMsqD8ARtqgAvpuSHEIiJ/YvfOyL4c wZqYJ5gNsCqI7AgNicpSvnfsO3DA23UrwIj16tHEIC1NGvsrx0+J6btWyIP3YY6dJyku ZzLTEwT1Fbsklrs905L5XwrEmJ+YKAU0mXSzOgDgP9C0NXYnSKVvbn3TckvlnK1nyZH8 nh3Q== 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=xGDsTPT86T4LuRJWjhR70wGw0i95sKl3YEXw9Ee0IO4=; b=rVAQTNWliL6GozKs+DpYpKn4H2f1u4dU+BWIwLP/Zu5IL/GN2qzpj5p9GVhcYt7AnW eJWKnFNtc3xvSKWuQ+vQOz3Jrsziv9nkZbl22EyOP/5TZTNMZ4ITs9OeTf6vFiMDZuXo yiKF5IACTkjoQnKuXxlbC7APgpjaeu+NvRWjvldhUVSLrz0zDrL+y1Iu06O5vEmEuN6J R+czYQ4AzRRMFqsJMBWiPGAE8R0+KbdVP683ejgIyfFM6OIqbmSpMd03fDtK4k2NxkMB jcWCrA1a7bQ5Sgru2OkEZyCsnRGv2m6olo+blWvHPUIV25Da1Ld3rqLhBTL111glyktC 6Yfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baikalelectronics.ru header.s=post header.b=YlOVmLg6; 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 kq20-20020a170906abd400b00977e338a94dsi4126570ejb.203.2023.06.11.13.16.57; Sun, 11 Jun 2023 13:17:23 -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=YlOVmLg6; 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 S233250AbjFKTUO (ORCPT + 99 others); Sun, 11 Jun 2023 15:20:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230211AbjFKTUN (ORCPT ); Sun, 11 Jun 2023 15:20:13 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 765AEE53; Sun, 11 Jun 2023 12:20:11 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 8820FE0E70; Sun, 11 Jun 2023 22:20:10 +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=xGDsTPT86T4LuRJWjhR70wGw0i95sKl3YEXw9Ee0IO4=; b=YlOVmLg6T6YU R/oTzVNQd/SCOHd5WdpxTexY29Q80y+q69fxMqiwYHjbG7LzO59okvCqlXO390+g uqPc0FVENTq80i6xDCqYu//N9yOnfwiv6o7KbAZRCYVdZUF0f+9twlbjdLzr8i3L wrICyS/o+t4YH/QABIU3RjDZ1Y6UvlA= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id 541F7E0DE3; Sun, 11 Jun 2023 22:20:10 +0300 (MSK) Received: from localhost (10.8.30.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sun, 11 Jun 2023 22:20:09 +0300 From: Serge Semin To: Bjorn Helgaas , Lorenzo Pieralisi , Jingoo Han , Gustavo Pimentel , 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 v7 04/11] PCI: bt1: Fix printing false error message Date: Sun, 11 Jun 2023 22:19:58 +0300 Message-ID: <20230611192005.25636-5-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230611192005.25636-1-Sergey.Semin@baikalelectronics.ru> References: <20230611192005.25636-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.8.30.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Reviewed-by: Manivannan Sadhasivam --- 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