提交 134ebfd8 编写于 作者: B Benjamin Tissoires 提交者: Jiri Kosina

HID: i2c-hid: also call i2c_hid_free_buffers in i2c_hid_remove

In the case where the hid driver in charge of handling the hid part
of the device (hid-generic for instance) fails at probe, neither
i2c_hid_start nor i2c_hid_stop are called.
Thus, the buffers allocated in i2c_hid_probe are never freed.
Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 9972dcc2
......@@ -908,6 +908,9 @@ static int __devexit i2c_hid_remove(struct i2c_client *client)
free_irq(client->irq, ihid);
if (ihid->bufsize)
i2c_hid_free_buffers(ihid);
kfree(ihid);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册