public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: intel-gfx@lists.freedesktop.org, alsa-devel@alsa-project.org,
	Kai Vehmanen <kai.vehmanen@linux.intel.com>
Subject: Re: [Intel-gfx] [PATCH] ALSA: hda/i915: Fix one too many pci_dev_put()
Date: Tue, 19 Apr 2022 07:54:30 +0200	[thread overview]
Message-ID: <s5hilr539ex.wl-tiwai@suse.de> (raw)
In-Reply-To: <20220418045032.74gipx7fo6ajnoib@ldmartin-desk2>

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@linux.intel.com>
> 
> 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.


thanks,

Takashi

  reply	other threads:[~2022-04-19  5:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-16  6:44 [PATCH] ALSA: hda/i915: Fix one too many pci_dev_put() Lucas De Marchi
2022-04-17 10:13 ` Kai Vehmanen
2022-04-18  4:50   ` [Intel-gfx] " Lucas De Marchi
2022-04-19  5:54     ` Takashi Iwai [this message]
2022-04-19  6:26       ` Lucas De Marchi
2022-04-19  6:40         ` Takashi Iwai
2022-04-19  6:56           ` Takashi Iwai
2022-04-19  7:01 ` Takashi Iwai
2022-04-19 15:05   ` Lucas De Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hilr539ex.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=lucas.demarchi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox