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.19 04/11] platform/x86: asus-wmi: add missing pci_dev_put() in asus_wmi_set_xusb2pr()
Date: Wed, 23 Nov 2022 07:44:49 -0500 [thread overview]
Message-ID: <20221123124458.266492-4-sashal@kernel.org> (raw)
In-Reply-To: <20221123124458.266492-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 339b753ba447..3723ae37993d 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -1176,6 +1176,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:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 12:44 [PATCH AUTOSEL 4.19 01/11] Input: synaptics - switch touchpad on HP Laptop 15-da3001TU to RMI mode Sasha Levin
2022-11-23 12:44 ` [PATCH AUTOSEL 4.19 02/11] serial: 8250: 8250_omap: Avoid RS485 RTS glitch on ->set_termios() Sasha Levin
2022-11-23 12:44 ` [PATCH AUTOSEL 4.19 03/11] xen/platform-pci: add missing free_irq() in error path Sasha Levin
2022-11-23 12:44 ` Sasha Levin [this message]
2022-11-23 12:44 ` [PATCH AUTOSEL 4.19 05/11] platform/x86: acer-wmi: Enable SW_TABLET_MODE on Switch V 10 (SW5-017) Sasha Levin
2022-11-23 12:44 ` [PATCH AUTOSEL 4.19 06/11] platform/x86: hp-wmi: Ignore Smart Experience App event Sasha Levin
2022-11-23 12:44 ` [PATCH AUTOSEL 4.19 07/11] tcp: configurable source port perturb table size Sasha Levin
2022-11-23 12:44 ` [PATCH AUTOSEL 4.19 08/11] dm-integrity: set dma_alignment limit in io_hints Sasha Levin
2022-11-23 12:44 ` [PATCH AUTOSEL 4.19 09/11] dm-log-writes: " Sasha Levin
2022-11-23 12:44 ` [PATCH AUTOSEL 4.19 10/11] net: usb: qmi_wwan: add Telit 0x103a composition Sasha Levin
2022-11-23 12:44 ` [PATCH AUTOSEL 4.19 11/11] dm integrity: flush the journal on suspend 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=20221123124458.266492-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;
as well as URLs for NNTP newsgroup(s).