From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Xiongfeng Wang <wangxiongfeng2@huawei.com>,
Hans de Goede <hdegoede@redhat.com>,
Sasha Levin <sashal@kernel.org>,
corentin.chary@gmail.com, markgross@kernel.org,
acpi4asus-user@lists.sourceforge.net,
platform-driver-x86@vger.kernel.org
Subject: [PATCH AUTOSEL 4.14 04/10] platform/x86: asus-wmi: add missing pci_dev_put() in asus_wmi_set_xusb2pr()
Date: Wed, 23 Nov 2022 07:45:12 -0500 [thread overview]
Message-ID: <20221123124520.266643-4-sashal@kernel.org> (raw)
In-Reply-To: <20221123124520.266643-1-sashal@kernel.org>
From: Xiongfeng Wang <wangxiongfeng2@huawei.com>
[ Upstream commit d0cdd85046b15089df71a50548617ac1025300d0 ]
pci_get_device() will increase the reference count for the returned
pci_dev. We need to use pci_dev_put() to decrease the reference count
before asus_wmi_set_xusb2pr() returns.
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Link: https://lore.kernel.org/r/20221111100752.134311-1-wangxiongfeng2@huawei.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/platform/x86/asus-wmi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index af26ca49996d..ca17ab9873e2 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -1107,6 +1107,8 @@ static void asus_wmi_set_xusb2pr(struct asus_wmi *asus)
pci_write_config_dword(xhci_pdev, USB_INTEL_XUSB2PR,
cpu_to_le32(ports_available));
+ pci_dev_put(xhci_pdev);
+
pr_info("set USB_INTEL_XUSB2PR old: 0x%04x, new: 0x%04x\n",
orig_ports_available, ports_available);
}
--
2.35.1
next prev parent reply other threads:[~2022-11-23 12:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 12:45 [PATCH AUTOSEL 4.14 01/10] Input: synaptics - switch touchpad on HP Laptop 15-da3001TU to RMI mode Sasha Levin
2022-11-23 12:45 ` [PATCH AUTOSEL 4.14 02/10] serial: 8250: 8250_omap: Avoid RS485 RTS glitch on ->set_termios() Sasha Levin
2022-11-23 12:45 ` [PATCH AUTOSEL 4.14 03/10] xen/platform-pci: add missing free_irq() in error path Sasha Levin
2022-11-23 12:45 ` Sasha Levin [this message]
2022-11-23 12:45 ` [PATCH AUTOSEL 4.14 05/10] platform/x86: acer-wmi: Enable SW_TABLET_MODE on Switch V 10 (SW5-017) Sasha Levin
2022-11-23 12:45 ` [PATCH AUTOSEL 4.14 06/10] platform/x86: hp-wmi: Ignore Smart Experience App event Sasha Levin
2022-11-23 12:45 ` [PATCH AUTOSEL 4.14 07/10] tcp: configurable source port perturb table size Sasha Levin
2022-11-23 12:45 ` [PATCH AUTOSEL 4.14 08/10] dm-integrity: set dma_alignment limit in io_hints Sasha Levin
2022-11-23 12:45 ` [PATCH AUTOSEL 4.14 09/10] dm-log-writes: " Sasha Levin
2022-11-23 12:45 ` [PATCH AUTOSEL 4.14 10/10] net: usb: qmi_wwan: add Telit 0x103a composition Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221123124520.266643-4-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=acpi4asus-user@lists.sourceforge.net \
--cc=corentin.chary@gmail.com \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=wangxiongfeng2@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox