aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_proc.c
diff options
context:
space:
mode:
authorWang Xingchao <xingchao.wang@intel.com>2012-06-07 04:52:07 -0400
committerTakashi Iwai <tiwai@suse.de>2012-06-07 05:40:58 -0400
commite076eb5c952c0f724980b44a77902a2ff93d098c (patch)
treea6ed25794bce0163c1998df129ea0c607932d83d /sound/pci/hda/hda_proc.c
parent0f4ccbb02533276ab750961e150aeee06492ed7c (diff)
ALSA: hda - check proper return value
snd_hda_param_read() return value -1 means error, others are responses Signed-off-by: Wang Xingchao <xingchao.wang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_proc.c')
-rw-r--r--sound/pci/hda/hda_proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
index 1dd9dbeeef6e..7e46258fc700 100644
--- a/sound/pci/hda/hda_proc.c
+++ b/sound/pci/hda/hda_proc.c
@@ -451,7 +451,7 @@ static void print_power_state(struct snd_info_buffer *buffer,
451 int sup = snd_hda_param_read(codec, nid, AC_PAR_POWER_STATE); 451 int sup = snd_hda_param_read(codec, nid, AC_PAR_POWER_STATE);
452 int pwr = snd_hda_codec_read(codec, nid, 0, 452 int pwr = snd_hda_codec_read(codec, nid, 0,
453 AC_VERB_GET_POWER_STATE, 0); 453 AC_VERB_GET_POWER_STATE, 0);
454 if (sup) 454 if (sup != -1)
455 snd_iprintf(buffer, " Power states: %s\n", 455 snd_iprintf(buffer, " Power states: %s\n",
456 bits_names(sup, names, ARRAY_SIZE(names))); 456 bits_names(sup, names, ARRAY_SIZE(names)));
457 457