Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4734520iob; Sun, 8 May 2022 23:40:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoGVsb7BzhCEdEMUdlj/4sYPnDt9tv7hQxiXtgUtPd7HsSNWTzGsClYA2MAbSxOtqiriZM X-Received: by 2002:a63:5907:0:b0:382:2f93:5467 with SMTP id n7-20020a635907000000b003822f935467mr11967282pgb.460.1652078456311; Sun, 08 May 2022 23:40:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652078456; cv=none; d=google.com; s=arc-20160816; b=hUoCJ3ZynwQLZBlJkyhm2aL5Lo7XnXJrZ2fUPGrHKvo2OqwCFdK99nw9sisyV2H3UB MB9opFd8aIfNHxK9BLlOe/+guhiqfW3gKZJLVHuyR6isIK6OkuZpDyU7/xYOADMTOcUw wU9pqUr7N6SUHKr1QT0wUzNKlhRm/lfECM3tJHIF8zH6uYXJb+vYmq4SBvua8xWZrcui 6Qk950p1FcVUl4touXnLgCHTzkB84DRt4JOmAmjsY1gmG9aULkJIuRPAkJk1kpslK3nW 928w9c2zPLo9J+CGlTyzn1lepj7jj7XpvST3USn7ma34zNDf8K8chb1peW2GWzD7kWNa Nicw== 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:subject:cc:to:from:date :dkim-signature; bh=Q0PjvfJP/AgMupTsY1tIpO2la3hsKEsChFdHc30o0XQ=; b=e1DCXQLldTAZohTtDlVaHfs6uBYKpkreyjDkDv2kr2vnMqzxz0GHR6mPs3lgPf91wM 2nJ9mqS2IpAb64Ghot30WBWWjDClZ+QCdteuRKkMawluR8T772zbzb+yF+KPW4ITfsm9 xqo4YD8HPdCeriIAEHFrO7PEPRk6UpXP2nBra8BPHrhfYaUGkTEH40dhETtu2WZdESaK EuItru7N5aVtyoB2q/QLWCPdKCPZWQeQehGhQ/+TedNtxoxOAm6N9NxtZPuSsXpUcUdE O/S3g9z5doLCLlia7TDwhxFmWSXcXWFAXElK8n9PWiATe1djCXWwbuSOqMWt2QkhPU0e qf2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NJ7O3m0R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x10-20020aa78f0a000000b004fa687c28d4si12743149pfr.86.2022.05.08.23.40.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 23:40:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NJ7O3m0R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8CF1118A6B5; Sun, 8 May 2022 23:38:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348926AbiEFQZw (ORCPT + 99 others); Fri, 6 May 2022 12:25:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443219AbiEFQZj (ORCPT ); Fri, 6 May 2022 12:25:39 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 806A45B884; Fri, 6 May 2022 09:21:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 331E0B832EB; Fri, 6 May 2022 16:21:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B2ABC385A8; Fri, 6 May 2022 16:21:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651854113; bh=trRiNmmL1AtuUo3L5IjmeWtY1NNXS8ALpeRvHwoFxTg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NJ7O3m0Rusa8vfHkct4H+5Qq/xcPwpx60ExUdfRVNut74kUn+kMPNknU0mL7b5SJU 2gxnmh7d2qY2yJjFGajLS8icgwF2k1qBNLx3mac0UdXaYXQWcNkmN/PEbaqvmtHU6L e3Uwd5mWnZs0MppGnM2fC2CdA/b5VbG4Rma4IfXwi3bon0dWuaK0I+PpMqiwlNqg8x azsjmgJZFTuDp7gKGUPNq7IeHX3esTKWT2I8nntxhqUv80Qa+DCekTh659oBEpHKfO oIh8HiFAeBoKCWSodeqb80NE7CzHABo7gSYx6kEgKS3i/yb32WQuxoMe5CVv1bptlI cQjWdiNmzbmOg== Date: Fri, 6 May 2022 09:21:52 -0700 From: Jakub Kicinski To: Rolf Eike Beer 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() Message-ID: <20220506092152.405ce691@kernel.org> In-Reply-To: <5564948.DvuYhMxLoT@eto.sf-tec.de> References: <20220506094250.3630615-1-yangyingliang@huawei.com> <5564948.DvuYhMxLoT@eto.sf-tec.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 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.