Re: [PATCH v7 3/5] usb: add apis for offload usage tracking

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

 



On Thu, Jan 9, 2025 at 11:04 PM Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Thu, Jan 09, 2025 at 03:55:07AM +0000, Guan-Yu Lin wrote:
> > +     /*
> > +      * offload_usage could only be modified when the device is active, since
> > +      * it will alter the suspend flow of the device.
> > +      */
> > +     ret = pm_runtime_get_sync(&udev->dev);
>
> Note that this function will increment the runtime PM reference count
> even if it returns an error.  You probably want to call
> pm_runtime_resume_and_get() instead.  Likewise in usb_offload_put().
>

Thanks for the heads up! Let me address this in the next patch.

Regards,
Guan-Yu





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux