mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
USB: Check no positive return values from pm_runtime_resume_and_get()
pm_runtime_resume_and_get() always returns a negative error code or zero; there's no need to check for positive values such as returned by pm_runtime_get_sync(). Simply drop the check. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Link: https://lore.kernel.org/r/20250815113121.925641-1-sakari.ailus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c851b71fd6
commit
23cd838a17
|
|
@ -1723,8 +1723,6 @@ int usb_autoresume_device(struct usb_device *udev)
|
|||
dev_vdbg(&udev->dev, "%s: cnt %d -> %d\n",
|
||||
__func__, atomic_read(&udev->dev.power.usage_count),
|
||||
status);
|
||||
if (status > 0)
|
||||
status = 0;
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
@ -1829,8 +1827,6 @@ int usb_autopm_get_interface(struct usb_interface *intf)
|
|||
dev_vdbg(&intf->dev, "%s: cnt %d -> %d\n",
|
||||
__func__, atomic_read(&intf->dev.power.usage_count),
|
||||
status);
|
||||
if (status > 0)
|
||||
status = 0;
|
||||
return status;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(usb_autopm_get_interface);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user