ALSA: hda - use input_free_device()

Use input_free_devce() correctly instead of kfree() at error path.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Takashi Iwai 2008-07-29 12:08:16 +02:00 committed by Jaroslav Kysela
parent 0d94e41abe
commit f6154d6d00

View File

@ -103,7 +103,7 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid)
err = input_register_device(input_dev);
if (err < 0) {
kfree(input_dev);
input_free_device(input_dev);
kfree(beep);
return err;
}