Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp706784rwd; Wed, 31 May 2023 04:27:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5pMT3/4SwKwS9LifE4jsPePJGy2StfVvuRJb/CHE2h7VKmtrvXV+ZjGrFUwUuU7P41Y4nP X-Received: by 2002:a92:d208:0:b0:331:a2f5:b50d with SMTP id y8-20020a92d208000000b00331a2f5b50dmr2460563ily.30.1685532450813; Wed, 31 May 2023 04:27:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685532450; cv=none; d=google.com; s=arc-20160816; b=iihH1OAaqr4y96ZaOjON1kgnTKChGsVPza5pr51XAHa5lzRAqCNiixmcmUbY/jLE0y Blmj+bTlNxUcCw6dT9olwrmtlj4peuudsWqomMFqMf3N9fC7CV9VsTiE3RO9+Z3zVJIO NX3JYvQHnMLYz+Xy/UNa5SWC46qp68W76OktSH8gqAH6vztvbHmmpOJ+pNXuaLzcxLAB /9sFsaE8W/42vARPLb23bQ8VMfjRM8J0y7ltnGOhDD7h8sfLFYOVALPze8s9mDXHato2 fsyKUeWhBgCGhu51E/mfrV6o3HM4a+N6oOXvAL5Rqfa6Zt029dVWJthxhIGbSwE3Le/a s9OQ== 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=g5ktBqpJFK822jQOa0OG/vi86u13uNOIx3jcdV4Dmar2lGussAP35fEhydg7u80Bwi HQK7+tv1rUs70zuremPM6ekLXFXqyJ4ejjCAa9NJsYc9AlI0EqBZtOnMOkrt58LWgcMv RdPykQPw1ehJXWFqKR9AUrj+0aqybcmJjNjr7aXQv7QCKjhwL04a+S5QwkBM9divvvSk Ti3NdvOZ/Z6eQSm0SukIGFzOyF8ij4aNZPN6bREyWO0F0mxbSIv1+ZhY5riWsnzC5Ne4 uLS+m4Yw9j1+WTe+VjpNvon+QQN5uncKEBpGQSdb+dk3uB/YGkkvw1fc2rJqbxJnJEs3 7wgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baikalelectronics.ru header.s=post header.b="ID/EMm4Z"; 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 l6-20020a170903120600b001ae0691dfdbsi756180plh.158.2023.05.31.04.27.18; Wed, 31 May 2023 04:27:30 -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="ID/EMm4Z"; 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 S235599AbjEaL0V (ORCPT + 99 others); Wed, 31 May 2023 07:26:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234727AbjEaL0L (ORCPT ); Wed, 31 May 2023 07:26:11 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 58B89126; Wed, 31 May 2023 04:26:10 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id 74010E0E1D; Wed, 31 May 2023 14:26:09 +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=ID/EMm4ZxidU Szol5r8Np1HEuyQG7tdxGlQxPpxV/zj6up4qbF7lCKHeUTZBdj0dMUGGxNkxzOMT KL2L5GS/ZRjK/BjxDfPdOl4iUpyb7fS7L9Jb5GRahTYHo/+rq6pGbgpHAW5TcZFz barqK//dozWqTUW32AdtM4t9o9R0snU= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id 50AB1E0DE3; Wed, 31 May 2023 14:26:09 +0300 (MSK) Received: from localhost (10.8.30.6) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 31 May 2023 14:26:08 +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 v6 04/11] PCI: bt1: Fix printing false error message Date: Wed, 31 May 2023 14:25:55 +0300 Message-ID: <20230531112602.7222-5-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230531112602.7222-1-Sergey.Semin@baikalelectronics.ru> References: <20230531112602.7222-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.8.30.6] 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,URIBL_BLOCKED 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