Re: [Intel-gfx] [PATCH] ALSA: hda/i915: Fix one too many pci_dev_put()

2022-04-19 Thread Lucas De Marchi
On Tue, Apr 19, 2022 at 09:01:34AM +0200, Takashi Iwai wrote: On Sat, 16 Apr 2022 08:44:18 +0200, Lucas De Marchi wrote: pci_get_class() will already unref the pci device passed as argument. So if it's unconditionally unref'ed, even if the loop is not stopped, there will be one too many unref f

Re: [Intel-gfx] [PATCH] ALSA: hda/i915: Fix one too many pci_dev_put()

2022-04-19 Thread Takashi Iwai
On Sat, 16 Apr 2022 08:44:18 +0200, Lucas De Marchi wrote: > > pci_get_class() will already unref the pci device passed as argument. > So if it's unconditionally unref'ed, even if the loop is not stopped, > there will be one too many unref for each device not matched. > > Cc: Kai Vehmanen > Cc:

Re: [Intel-gfx] [PATCH] ALSA: hda/i915: Fix one too many pci_dev_put()

2022-04-18 Thread Takashi Iwai
On Tue, 19 Apr 2022 08:40:01 +0200, Takashi Iwai wrote: > > On Tue, 19 Apr 2022 08:26:06 +0200, > Lucas De Marchi wrote: > > > > On Tue, Apr 19, 2022 at 07:54:30AM +0200, Takashi Iwai wrote: > > >On Mon, 18 Apr 2022 06:50:32 +0200, > > >Lucas De Marchi wrote: > > >> > > >> On Sun, Apr 17, 2022 at

Re: [Intel-gfx] [PATCH] ALSA: hda/i915: Fix one too many pci_dev_put()

2022-04-18 Thread Takashi Iwai
On Tue, 19 Apr 2022 08:26:06 +0200, Lucas De Marchi wrote: > > On Tue, Apr 19, 2022 at 07:54:30AM +0200, Takashi Iwai wrote: > >On Mon, 18 Apr 2022 06:50:32 +0200, > >Lucas De Marchi wrote: > >> > >> On Sun, Apr 17, 2022 at 01:13:49PM +0300, Kai Vehmanen wrote: > >> >Hi, > >> > > >> >On Fri, 15 Ap

Re: [Intel-gfx] [PATCH] ALSA: hda/i915: Fix one too many pci_dev_put()

2022-04-18 Thread Lucas De Marchi
On Tue, Apr 19, 2022 at 07:54:30AM +0200, Takashi Iwai wrote: On Mon, 18 Apr 2022 06:50:32 +0200, Lucas De Marchi wrote: On Sun, Apr 17, 2022 at 01:13:49PM +0300, Kai Vehmanen wrote: >Hi, > >On Fri, 15 Apr 2022, Lucas De Marchi wrote: > >> pci_get_class() will already unref the pci device passe

Re: [Intel-gfx] [PATCH] ALSA: hda/i915: Fix one too many pci_dev_put()

2022-04-18 Thread Takashi Iwai
On Mon, 18 Apr 2022 06:50:32 +0200, Lucas De Marchi wrote: > > On Sun, Apr 17, 2022 at 01:13:49PM +0300, Kai Vehmanen wrote: > >Hi, > > > >On Fri, 15 Apr 2022, Lucas De Marchi wrote: > > > >> pci_get_class() will already unref the pci device passed as argument. > >> So if it's unconditionally unre

Re: [Intel-gfx] [PATCH] ALSA: hda/i915: Fix one too many pci_dev_put()

2022-04-17 Thread Lucas De Marchi
On Sun, Apr 17, 2022 at 01:13:49PM +0300, Kai Vehmanen wrote: Hi, On Fri, 15 Apr 2022, Lucas De Marchi wrote: pci_get_class() will already unref the pci device passed as argument. So if it's unconditionally unref'ed, even if the loop is not stopped, thanks Lucas. And yes indeed, overlooked t

Re: [Intel-gfx] [PATCH] ALSA: hda/i915: Fix one too many pci_dev_put()

2022-04-17 Thread Kai Vehmanen
Hi, On Fri, 15 Apr 2022, Lucas De Marchi wrote: > pci_get_class() will already unref the pci device passed as argument. > So if it's unconditionally unref'ed, even if the loop is not stopped, thanks Lucas. And yes indeed, overlooked that pci_get_class() will decrement the from device is specifi

[Intel-gfx] [PATCH] ALSA: hda/i915: Fix one too many pci_dev_put()

2022-04-15 Thread Lucas De Marchi
pci_get_class() will already unref the pci device passed as argument. So if it's unconditionally unref'ed, even if the loop is not stopped, there will be one too many unref for each device not matched. Cc: Kai Vehmanen Cc: Takashi Iwai Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/57