Received: by 2002:a17:90a:c8b:0:0:0:0 with SMTP id v11csp2290232pja; Fri, 19 Apr 2019 11:22:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqw2u9koHuRDQzCBrvhUR5x5bYT/jaPMhXNttjE3yIGVVapV5OigVg3oi14ZWqPiV6V/roBl X-Received: by 2002:a17:902:86:: with SMTP id a6mr5174731pla.277.1555698145666; Fri, 19 Apr 2019 11:22:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555698145; cv=none; d=google.com; s=arc-20160816; b=iyl7Vth4UdwwAgmNXjzmiNrRuSifGvyjytFGsZYPceHb2KlQQ3x7DPABseswNTf7p6 BUav1Lilv668zmw9zYCX6IhneM3HUR70jzWvuybb1kpTbPA5PhYttb42fHXolzWhOwyp a/er7+6wqAF+/ZAqZp4rTqcEsXZ1sZqBwOWWRV5+/Hy594OCo6v6IpctWAFe91leUAt3 eg7947s1/6d6WS5didp5mujZZK0P0TEXSXvkTYqvqUatKfbu6cyJI+Z0WDp2wFSVx/Dm LQVEHHl18duFQ0/jwgXEb4QVQNYlhi47QYlkPVm9jxGQGx4Vgp1jAu1POOSbkBAIso65 Xu5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8sNxl0hEqODlC+hizSvqr3xUDHjjB8NZZkZymPPfOvY=; b=vuswm5M1Vvf9QM0QE9En4vrVxvx4l61SLA0P4mLyrSuqEy2F9XwntDlXklvwOAI/uy Ixttkc6KKaQ61s840meAma8DQOYP0g/g/7Flz9NL7gE+5eBH5GocZ0u5nKbhpPvK9QSh 2sOjn9O4fCqDVBUv64MmkLG1tDFlQxWEATrjGdFtZ7JaDMcgQm/r4w5Yxbr0ZDNMfVpp FtlbB09sEiCNau/arUaSWi/D60wFBIEZsYmOPXv+PcT7rDGs3SU0nccZw/xmbvSvMA6d clH7PzFedv9fI0PXZABfe4KlJPg6tTZEFZBhrKVQSgAY5UGZTtT0y6SC8JbZyXPw+RZ0 DQRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=naIP3E07; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 73si5459797plb.158.2019.04.19.11.22.10; Fri, 19 Apr 2019 11:22:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=naIP3E07; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727736AbfDSSVV (ORCPT + 99 others); Fri, 19 Apr 2019 14:21:21 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:46135 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727448AbfDSSVT (ORCPT ); Fri, 19 Apr 2019 14:21:19 -0400 Received: by mail-wr1-f67.google.com with SMTP id t17so7791863wrw.13; Fri, 19 Apr 2019 11:21:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8sNxl0hEqODlC+hizSvqr3xUDHjjB8NZZkZymPPfOvY=; b=naIP3E07hKz9hhJLONZLM7NzxQwVLhpVzVE0rbFHxxGq15ALwhLw6H7ABoX4JERvdX nPx6ErSt54JKMABpMiNjJG11NXzCjG/1pGSwGOPHD0dHRVt2evWpIUbmTUK0146mNm1M CDojXmqspVqiPZx6r0VSleUcw2nsacUN45VHmMcpL7cCstQTmvGETfAEs7yYhubFfea9 zfaX60KKiNxuKC0Yd1vrsxXr0Bu9cFxBZ3w477BNQkpydYazALvEuxq8QsulZ84cyynf ZrilGYcNiWmFGJrLksDC1C54mjK0ysRtwZthtsIv4xgtsg2ujQehxeyEpOwjMxL2gB8R KMkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8sNxl0hEqODlC+hizSvqr3xUDHjjB8NZZkZymPPfOvY=; b=Mn8Db0XtIIPTWjb8vSBzhdjzY2Qw4eM1eQ2cMNdk4rm3BdP0UZ7vaGqFCVim8Akwd+ 1ZdVnfgVQF/V6B35Ho6NE/CKiN9r6FRyo37B62MCmL3mwHtXp/4qm9ClL4XIjKAaCzC+ dwwVG2k8gQqODOVWq2N/uguJn7ce//baN6+TScHr2qI7MXPYTpjVDN/W86FRNAsmb+0K oD5FuosXOW4Pm4PA7K4i4jWddBPxt+rxCNBVEPOqbNrpagPpi1jmXi+bKcDENnloNxY6 pVJeLYsV744qSooNIAJavIbiBQOotTpb6OVyMUezgwGQtqHj5R3ynQWWtcTgIeQgby1a wQ1A== X-Gm-Message-State: APjAAAUf+aSHHjFzTabNxCeL/00wqY4Ha3r17MVGBEMW1HMO/SAo/fp0 AMu/fjoe8qWgYMndcXSpC+gH3I3m X-Received: by 2002:a5d:4d42:: with SMTP id a2mr4134240wru.130.1555696630034; Fri, 19 Apr 2019 10:57:10 -0700 (PDT) Received: from debian64.daheim (p4FD090B5.dip0.t-ipconnect.de. [79.208.144.181]) by smtp.gmail.com with ESMTPSA id c2sm4718719wrr.13.2019.04.19.10.57.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Apr 2019 10:57:08 -0700 (PDT) Received: from localhost.daheim ([127.0.0.1] helo=debian64.localnet) by debian64.daheim with esmtp (Exim 4.92) (envelope-from ) id 1hHXkr-0007gA-OV; Fri, 19 Apr 2019 19:56:59 +0200 From: Christian Lamparter To: Pan Bian Cc: Christian Lamparter , Kalle Valo , "David S. Miller" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: p54: drop device reference count if fails to enable device Date: Fri, 19 Apr 2019 19:56:47 +0200 Message-ID: <4374745.djV02MS7NJ@debian64> In-Reply-To: <1555494083-130833-1-git-send-email-bianpan2016@163.com> References: <1555494083-130833-1-git-send-email-bianpan2016@163.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Subject should include a "[PATCH]" as per: https://www.kernel.org/doc/html/v4.15/process/submitting-patches.html#include-patch-in-the-subject Nevertheless, patchwork picked it up.... so, you are probably fine. https://patchwork.kernel.org/patch/10905039/ On Wednesday, April 17, 2019 11:41:23 AM CEST Pan Bian wrote: > The function p54p_probe takes an extra reference count of the PCI > device. However, the extra reference count is not dropped when it fails > to enable the PCI device. This patch fixes the bug. > > Signed-off-by: Pan Bian Cc: stable@vger.kernel.org Acked-by: Christian Lamparter > --- > drivers/net/wireless/intersil/p54/p54pci.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/intersil/p54/p54pci.c b/drivers/net/wireless/intersil/p54/p54pci.c > index 27a4906..57ad564 100644 > --- a/drivers/net/wireless/intersil/p54/p54pci.c > +++ b/drivers/net/wireless/intersil/p54/p54pci.c > @@ -554,7 +554,7 @@ static int p54p_probe(struct pci_dev *pdev, > err = pci_enable_device(pdev); > if (err) { > dev_err(&pdev->dev, "Cannot enable new PCI device\n"); > - return err; > + goto err_put; > } > > mem_addr = pci_resource_start(pdev, 0); > @@ -639,6 +639,7 @@ static int p54p_probe(struct pci_dev *pdev, > pci_release_regions(pdev); > err_disable_dev: > pci_disable_device(pdev); > +err_put: > pci_dev_put(pdev); > return err; > } >