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:
parent
0d94e41abe
commit
f6154d6d00
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user