]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda: fix possible NULL dereference
authorMarkus Osterhoff <linux-kernel@k-raum.org>
Mon, 24 Aug 2015 12:11:39 +0000 (14:11 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 24 Aug 2015 13:02:03 +0000 (15:02 +0200)
commit97363ce6c73622aacf149ed41d0c31c278fc8b4b
treea9bed7c211f32527244073be24275669f87274b6
parent96d3164ed82dea6b708a45bed64d90a8efccfcaa
ALSA: hda: fix possible NULL dereference

After a for-loop was replaced by list_for_each_entry, see
Commit a3b5e36b89a7 ("ALSA: hda - Allocate hda_pcm objects dynamically"),
Commit 790de5b271ca ("ALSA: hda: fix possible null dereference"),
a possible NULL pointer dereference has been introduced; this patch adds
the NULL check on pcm->pcm, while leaving a potentially superfluous
check on pcm itself untouched.

Signed-off-by: Markus Osterhoff <linux-kernel@k-raum.org>
Cc: <stable@vger.kernel.org> #v4.1+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c