Skip to content

Commit 1ade6a4

Browse files
committed
USB: core: Discard pm_runtime_put() return value
To allow the return type of pm_runtime_put() to be changed to void in the future, modify usb_autopm_put_interface_async() to discard the return value of pm_runtime_put(). That value is merely used in a debug comment printed by the function in question and it is not a particularly useful piece of information because pm_runtime_put() does not guarantee that the device will be suspended even if it successfully queues up a work item to check whether or not the device can be suspended. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/5058509.GXAFRqVoOG@rafael.j.wysocki
1 parent 9ace475 commit 1ade6a4

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

drivers/usb/core/driver.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1810,13 +1810,11 @@ EXPORT_SYMBOL_GPL(usb_autopm_put_interface);
18101810
void usb_autopm_put_interface_async(struct usb_interface *intf)
18111811
{
18121812
struct usb_device *udev = interface_to_usbdev(intf);
1813-
int status;
18141813

18151814
usb_mark_last_busy(udev);
1816-
status = pm_runtime_put(&intf->dev);
1817-
dev_vdbg(&intf->dev, "%s: cnt %d -> %d\n",
1818-
__func__, atomic_read(&intf->dev.power.usage_count),
1819-
status);
1815+
pm_runtime_put(&intf->dev);
1816+
dev_vdbg(&intf->dev, "%s: cnt %d\n",
1817+
__func__, atomic_read(&intf->dev.power.usage_count));
18201818
}
18211819
EXPORT_SYMBOL_GPL(usb_autopm_put_interface_async);
18221820

0 commit comments

Comments
 (0)