aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-02-06 04:24:04 -0500
committerTakashi Iwai <tiwai@suse.de>2012-02-06 04:27:06 -0500
commiteedec3d3854a390fc14008f265930f8c22b0373f (patch)
treee5fb6f36445e78dddc4d182bb64ceecf9eb88949 /sound
parent226e01ef0da0b1a4c2c3922fb83ff3f9e4dfb508 (diff)
ALSA: hda/realtek - Fix a wrong condition
sparse complains that "spec->multiout.dac_nids" is a pointer. sound/pci/hda/patch_realtek.c:2321:37: error: incompatible types for operation (>) sound/pci/hda/patch_realtek.c:2321:37: left side has type unsigned short const [usertype] *dac_nids sound/pci/hda/patch_realtek.c:2321:37: right side has type int It was meant to be num_dacs instead of dac_nids. Although the current code still works as expected (when num_dacs is zero, dac_nids should be NULL, too), better to fix now, of course. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_realtek.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 33b6077fcdb..485a83746e5 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2322,7 +2322,7 @@ static int alc_build_pcms(struct hda_codec *codec)
2322 "%s Analog", codec->chip_name); 2322 "%s Analog", codec->chip_name);
2323 info->name = spec->stream_name_analog; 2323 info->name = spec->stream_name_analog;
2324 2324
2325 if (spec->multiout.dac_nids > 0) { 2325 if (spec->multiout.num_dacs > 0) {
2326 p = spec->stream_analog_playback; 2326 p = spec->stream_analog_playback;
2327 if (!p) 2327 if (!p)
2328 p = &alc_pcm_analog_playback; 2328 p = &alc_pcm_analog_playback;