浏览代码

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>
Takashi Iwai 17 年之前
父节点
当前提交
f6154d6d00
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      sound/pci/hda/hda_beep.c

+ 1 - 1
sound/pci/hda/hda_beep.c

@@ -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;
 	}