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

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

 



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 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 that pci_get_class()
> > >> >will decrement the from device is specified.
> > >> >
> > >> >> --- a/sound/hda/hdac_i915.c
> > >> >> +++ b/sound/hda/hdac_i915.c
> > >> >> @@ -127,11 +127,10 @@ static int i915_gfx_present(struct pci_dev *hdac_pci)
> > >> >>  		display_dev = pci_get_class(class, display_dev);
> > >> >>
> > >> >>  		if (display_dev && display_dev->vendor == PCI_VENDOR_ID_INTEL &&
> > >> >> -		    connectivity_check(display_dev, hdac_pci))
> > >> >> +		    connectivity_check(display_dev, hdac_pci)) {
> > >> >> +			pci_dev_put(display_dev);
> > >> >>  			match = true;
> > >> >> -
> > >> >> -		pci_dev_put(display_dev);
> > >> >> -
> > >> >> +		}
> > >> >
> > >> >Reviewed-by: Kai Vehmanen <kai.vehmanen@xxxxxxxxxxxxxxx>
> > >>
> > >> I applied this to our topic/core-for-CI branch to unblock CI on
> > >> DG2. Ultimately the target for this is the sound tree though.
> > >
> > >The patch looks good, feel free to submit it.
> > 
> > not sure if I was clear. This patch is already targeting the sound tree:
> > it should apply cleanly.
> 
> The original patch hasn't reached to me (we've had the mail server
> problem in the last weekend, and that might be the reason).
> 
> Could you resubmit?

Never mind, I could find it in lore.
  https://lore.kernel.org/all/20220416064418.2364582-1-lucas.demarchi@xxxxxxxxx/


Takashi



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux