platform/x86: asus-wmi: add missing pci_dev_put() in asus_wmi_set_xusb2pr()
authorXiongfeng Wang <wangxiongfeng2@huawei.com>
Fri, 11 Nov 2022 10:07:52 +0000 (18:07 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Dec 2022 10:16:31 +0000 (11:16 +0100)
commit43d275ac9eb21fce16318d818c4a7a175820f553
treedf76bc3bc3b6609cc510f816703685596575cd4e
parent1b23d4a077c7ef0cb71d98840806a4b900e3310a
platform/x86: asus-wmi: add missing pci_dev_put() in asus_wmi_set_xusb2pr()

[ 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