aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-12-10 08:26:21 -0500
committerTakashi Iwai <tiwai@suse.de>2014-12-10 08:45:22 -0500
commit6e1d7a51392f06899bd7b693f28ac60fa1e00032 (patch)
treea175acb89cd1963b09e6bf632184124c9c931a47 /sound
parentfeabb67e0eb0f509b530a56756ea44364843faea (diff)
ALSA: pcxhr: NULL dereference on probe failure
"card" is NULL if snd_card_new() fails. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/pcxhr/pcxhr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c
index a60293015267..c6092e48ceb6 100644
--- a/sound/pci/pcxhr/pcxhr.c
+++ b/sound/pci/pcxhr/pcxhr.c
@@ -1638,7 +1638,7 @@ static int pcxhr_probe(struct pci_dev *pci,
1638 0, &card); 1638 0, &card);
1639 1639
1640 if (err < 0) { 1640 if (err < 0) {
1641 dev_err(card->dev, "cannot allocate the card %d\n", i); 1641 dev_err(&pci->dev, "cannot allocate the card %d\n", i);
1642 pcxhr_free(mgr); 1642 pcxhr_free(mgr);
1643 return err; 1643 return err;
1644 } 1644 }