alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Fengguang Wu <fengguang.wu@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: sound/pci/hda/hda_generic.c:1529 indep_hp_put() warn: inconsistent returns mutex:&spec->pcm_mutex: locked (1526) unlocked (1517, 1529)
Date: Sat, 12 Jan 2013 10:16:50 +0800	[thread overview]
Message-ID: <20130112021650.GC6150@localhost> (raw)
In-Reply-To: <50f05fed.WTL9MFXChbKhBxPs%yuanhan.liu@linux.intel.com>


Hi Takashi,

FYI, there are new smatch warnings show up in

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-unstable.git master
head:   02e5aa7b459f69538d4ec88658d064816a7692d6
commit: a5de6f4d021608c50ff5ff51d208b5030da92957 ALSA: hda - Implement independent HP control
date:   33 hours ago

sound/pci/hda/hda_generic.c:1529 indep_hp_put() warn: inconsistent returns mutex:&spec->pcm_mutex: locked (1526) unlocked (1517,1529)

vim +1529 sound/pci/hda/hda_generic.c

a5de6f4d Takashi Iwai 2012-12-21  1511  	struct hda_gen_spec *spec = codec->spec;
a5de6f4d Takashi Iwai 2012-12-21  1512  	unsigned int select = ucontrol->value.enumerated.item[0];
a5de6f4d Takashi Iwai 2012-12-21  1513  
a5de6f4d Takashi Iwai 2012-12-21  1514  	mutex_lock(&spec->pcm_mutex);
a5de6f4d Takashi Iwai 2012-12-21  1515  	if (spec->active_streams) {
a5de6f4d Takashi Iwai 2012-12-21  1516  		mutex_unlock(&spec->pcm_mutex);
a5de6f4d Takashi Iwai 2012-12-21 @1517  		return -EBUSY;
a5de6f4d Takashi Iwai 2012-12-21  1518  	}
a5de6f4d Takashi Iwai 2012-12-21  1519  
a5de6f4d Takashi Iwai 2012-12-21  1520  	if (spec->indep_hp_enabled != select) {
a5de6f4d Takashi Iwai 2012-12-21  1521  		spec->indep_hp_enabled = select;
a5de6f4d Takashi Iwai 2012-12-21  1522  		if (spec->indep_hp_enabled)
a5de6f4d Takashi Iwai 2012-12-21  1523  			spec->multiout.hp_out_nid[0] = 0;
a5de6f4d Takashi Iwai 2012-12-21  1524  		else
a5de6f4d Takashi Iwai 2012-12-21  1525  			spec->multiout.hp_out_nid[0] = spec->alt_dac_nid;
a5de6f4d Takashi Iwai 2012-12-21 @1526  		return 1;
a5de6f4d Takashi Iwai 2012-12-21  1527  	}
a5de6f4d Takashi Iwai 2012-12-21  1528  	mutex_unlock(&spec->pcm_mutex);
a5de6f4d Takashi Iwai 2012-12-21 @1529  	return 0;
a5de6f4d Takashi Iwai 2012-12-21  1530  }
a5de6f4d Takashi Iwai 2012-12-21  1531  
a5de6f4d Takashi Iwai 2012-12-21  1532  static const struct snd_kcontrol_new indep_hp_ctl = {

---
0-DAY kernel build testing backend         Open Source Technology Center
Fengguang Wu, Yuanhan Liu                              Intel Corporation

           reply	other threads:[~2013-01-12  2:16 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <50f05fed.WTL9MFXChbKhBxPs%yuanhan.liu@linux.intel.com>]

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=20130112021650.GC6150@localhost \
    --to=fengguang.wu@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).