Re: [BUG] usb: core: resume clears needs_altsetting0 even on failure

From: Greg Kroah-Hartman

Date: Mon Nov 16 2026 - 04:33:35 EST


On Sun, Nov 15, 2026 at 08:36:54AM -0800, Cheng Yongkang wrote:
> Hi Greg, Alan,
>
> I hit a corner case in usb_resume_interface(). It needs a device that
> fails SET_INTERFACE(0) both when the driver is unbound and again at
> resume, so it may not be worth fixing.

<snip>

As your "tool" found these, it can also make a proposed patch and test
it for them as well. Please do so, don't just send "empty" messages
that claim a problem is found by a static analysis program.

thanks,

greg k-h