diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-12-10 08:06:46 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-12-10 08:45:15 -0500 |
commit | feabb67e0eb0f509b530a56756ea44364843faea (patch) | |
tree | b563eda6f6d1071a2081f8149396ed7c6fdd65ce /sound/pci | |
parent | 9faa73f06ec2408cf86d20758d879b8d928ab30a (diff) |
ALSA: lola: 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/pci')
-rw-r--r-- | sound/pci/lola/lola.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/lola/lola.c b/sound/pci/lola/lola.c index a75c8dc66dec..4cf4be5ef82a 100644 --- a/sound/pci/lola/lola.c +++ b/sound/pci/lola/lola.c | |||
@@ -719,7 +719,7 @@ static int lola_probe(struct pci_dev *pci, | |||
719 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, | 719 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
720 | 0, &card); | 720 | 0, &card); |
721 | if (err < 0) { | 721 | if (err < 0) { |
722 | dev_err(card->dev, "Error creating card!\n"); | 722 | dev_err(&pci->dev, "Error creating card!\n"); |
723 | return err; | 723 | return err; |
724 | } | 724 | } |
725 | 725 | ||