ALSA: hda - use input_free_device()
authorTakashi Iwai <tiwai@suse.de>
Tue, 29 Jul 2008 10:08:16 +0000 (12:08 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 29 Jul 2008 19:32:08 +0000 (21:32 +0200)
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>
sound/pci/hda/hda_beep.c

index 5a764c4..9b77b3e 100644 (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;
        }