Re: [PATCH] usb: core: Add error handling in usb_reset_device for autoresume failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20.02.25 10:52, Wentao Liang wrote:
In usb_reset_device(),  the function continues execution and
calls usb_autosuspend_device() after usb_autosuspend_device fails.

This can only fail if the device needs to be physically
resumed. In that case you called usb_reset_device() while
you weren't supposed to. The purpose of the call is to keep
the counter elevated in order to disable runtime power management
temporarily.

The code is older than helpers to elevate the count. The correct
fix would be to use them rather than handle an error that cannot
happen.

	Regards
		Oliver





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux