Marc-AndrĂ© Lureau <[email protected]> writes:

> Hi
>
> On Fri, Jan 29, 2016 at 4:43 PM, Markus Armbruster <[email protected]> wrote:
>> The existing users pass a func that saves dev, and free the saved dev
>> later.  Works as long as we call func() at most once.  If multiple
>> devices match, all but the last one are leaked.  Can this happen?
>
> It is the responsability of the func() callback to deal with multiple
> matches.

If that's the case, and multiple devices can match, then the callbacks
are all broken.

>          I don't think this needs to change.

If you mean to say that you don't have to fix it in this series: yes,
but it still needs fixing.  If you don't want to fix it, consider adding
a FIXME comment.

> This fix is only about the case of unmatching devices that need to be
> free within qpci_device_foreach().
>
> Do you ack that fix?

I'd be willing to.

Reply via email to