Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp550829iob; Fri, 13 May 2022 07:28:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2BRKLfjWgcSJ3lxmIPSpMTEsq9EuHyWQZ8FoTSAYL0vd7zaRTIGVgmL8iaFM3W31aUwIj X-Received: by 2002:a17:906:2294:b0:6f3:bd02:95a3 with SMTP id p20-20020a170906229400b006f3bd0295a3mr4392119eja.201.1652452085733; Fri, 13 May 2022 07:28:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652452085; cv=none; d=google.com; s=arc-20160816; b=tOz0w/eMIoPIzGjfVFHeBFGfkgNmr7NIdixAEJt3DXgeJdaX0GMHaEb/ORWhyqEmnu 29SbSbiHJd3zDckb3n9yGhAZwOKmjmFJb9HYn9yFfj96LhYeEx2OlLtvbHFNAtZV7Vx5 5oYn2ws+iY4Q5rTcOcsfZiYB/qlJTWMucvzjg0T1M2Ed2p0zYtF7jEAWZRhmrpG1BS9H VIM28RpEZFyl4Ka2279tC6GK+DlT1jZdikvTExhSi6+Vqk+i8xafZlp+/fUDooYAwg2U Xamxu5b0AEV8vKOOpL1id6qVqShaEaUijP+Jdo6aWQYKv5sRhye8BC5rTtaFsDsMOYLp BmFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=bxwmHqkGPY8LMLtWwMa9azvG76hHeWg8bCOMQ1aMxBo=; b=1FUO024RG7ICDfSxP0BdN/12kRuEuzo3FLJeTnvkiPOJ0H/4YIyRxr8Isae78wvHjz SV7VdBHFhvW2KAMt1yL9z+5E9ZSONDKwORKLWholplZYMt7qNGd90A+Ran6rNv5BofvQ NBGQ3jLskqhtUOy+VmaPvdrQQF98k2u0kHXtwaQpeJVN2QNJdMZviU8QBPaQiPnj0i/J RiKK1B3YtFRTe9uSyY4SX4WdVrzMHKNDxKvQLL1MOtbtm5/Ikdtb3z59RKOQVn39nFgQ g/fv2r43p3HAYX4yLlSVydB90xUyLRsdPWhjhoQPDqb+3V2vHzTZvPPOQJbmj1GucW2a 67ZA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs35-20020a1709072d2300b006df76385e7asi2256575ejc.794.2022.05.13.07.27.39; Fri, 13 May 2022 07:28:05 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243339AbiEKVzV (ORCPT + 99 others); Wed, 11 May 2022 17:55:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230306AbiEKVzS (ORCPT ); Wed, 11 May 2022 17:55:18 -0400 Received: from mail.sf-mail.de (mail.sf-mail.de [IPv6:2a01:4f8:1c17:6fae:616d:6c69:616d:6c69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1159416ABE9 for ; Wed, 11 May 2022 14:55:17 -0700 (PDT) Received: (qmail 13869 invoked from network); 11 May 2022 21:55:07 -0000 Received: from p200300cf0714e800cc89edd9cd300843.dip0.t-ipconnect.de ([2003:cf:714:e800:cc89:edd9:cd30:843]:36748 HELO daneel.sf-tec.de) (auth=eike@sf-mail.de) by mail.sf-mail.de (Qsmtpd 0.38dev) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPSA for ; Wed, 11 May 2022 23:55:07 +0200 From: Rolf Eike Beer To: Jakub Kicinski Cc: linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, netdev@vger.kernel.org, Yang Yingliang , davem@davemloft.net, edumazet@google.com Subject: Re: [PATCH] ethernet: tulip: fix missing pci_disable_device() on error in tulip_init_one() Date: Wed, 11 May 2022 23:55:04 +0200 Message-ID: <5568353.DvuYhMxLoT@daneel.sf-tec.de> In-Reply-To: <20220506092152.405ce691@kernel.org> References: <20220506094250.3630615-1-yangyingliang@huawei.com> <5564948.DvuYhMxLoT@eto.sf-tec.de> <20220506092152.405ce691@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5823012.lOV4Wx5bFT"; micalg="pgp-sha1"; protocol="application/pgp-signature" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 --nextPart5823012.lOV4Wx5bFT Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Am Freitag, 6. Mai 2022, 18:21:52 CEST schrieb Jakub Kicinski: > On Fri, 06 May 2022 12:11:56 +0200 Rolf Eike Beer wrote: > > Am Freitag, 6. Mai 2022, 11:42:50 CEST schrieb Yang Yingliang: > > > Fix the missing pci_disable_device() before return > > > from tulip_init_one() in the error handling case. > > > > I would suggest removing the pci_disable_device() from tulip_remove_one() > > instead and using pcim_enable_device(), i.e. devres, and let the driver > > core handle all these things. Of course more of the used functions could > > be converted them, e.g. using devm_alloc_etherdev() and so on. > > Let's not rewrite the error handling in this dinosaur of a driver > any more than absolutely necessary, please. Challenge accepted ;) [ 274.452394] tulip0: no phy info, aborting mtable build [ 274.499041] tulip0: MII transceiver #1 config 1000 status 782d advertising 01e1 [ 274.750691] net eth0: Digital DS21142/43 Tulip rev 65 at MMIO 0xf4008000, 00:30:6e:08:7d:21, IRQ 17 [ 283.104520] net eth0: Setting full-duplex based on MII#1 link partner capability of c1e1 Works fine, patch in a minute. --nextPart5823012.lOV4Wx5bFT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSaYVDeqwKa3fTXNeNcpIk+abn8TgUCYnwwuAAKCRBcpIk+abn8 Ti85AJ9kQ7SD83xxU6gnW4mBa4gibh6QfgCeLiMiLBwYV6WZOMq/2YAj4ZVKgf4= =pjR/ -----END PGP SIGNATURE----- --nextPart5823012.lOV4Wx5bFT--