Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Sakari Ailus and committed by
Greg Kroah-Hartman
23cd838a c851b71f

-4
-4
drivers/usb/core/driver.c
··· 1723 1723 dev_vdbg(&udev->dev, "%s: cnt %d -> %d\n", 1724 1724 __func__, atomic_read(&udev->dev.power.usage_count), 1725 1725 status); 1726 - if (status > 0) 1727 - status = 0; 1728 1726 return status; 1729 1727 } 1730 1728 ··· 1827 1829 dev_vdbg(&intf->dev, "%s: cnt %d -> %d\n", 1828 1830 __func__, atomic_read(&intf->dev.power.usage_count), 1829 1831 status); 1830 - if (status > 0) 1831 - status = 0; 1832 1832 return status; 1833 1833 } 1834 1834 EXPORT_SYMBOL_GPL(usb_autopm_get_interface);