diff options
-rw-r--r-- | sound/pci/hda/hda_beep.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c index b1796ae1e8f..3ecd7e797de 100644 --- a/sound/pci/hda/hda_beep.c +++ b/sound/pci/hda/hda_beep.c | |||
@@ -88,6 +88,10 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid) | |||
88 | snprintf(beep->phys, sizeof(beep->phys), | 88 | snprintf(beep->phys, sizeof(beep->phys), |
89 | "card%d/codec#%d/beep0", codec->bus->card->number, codec->addr); | 89 | "card%d/codec#%d/beep0", codec->bus->card->number, codec->addr); |
90 | input_dev = input_allocate_device(); | 90 | input_dev = input_allocate_device(); |
91 | if (!input_dev) { | ||
92 | kfree(beep); | ||
93 | return -ENOMEM; | ||
94 | } | ||
91 | 95 | ||
92 | /* setup digital beep device */ | 96 | /* setup digital beep device */ |
93 | input_dev->name = "HDA Digital PCBeep"; | 97 | input_dev->name = "HDA Digital PCBeep"; |