Skip to content

Commit

Permalink
ALSA: hda - use input_free_device()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Jul 29, 2008
1 parent 0d94e41 commit f6154d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/hda/hda_beep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f6154d6

Please sign in to comment.