HID: i2c-hid: fix memory leak during probe
authorJiri Kosina <jkosina@suse.cz>
Tue, 20 Nov 2012 16:09:40 +0000 (17:09 +0100)
committerJiri Kosina <jkosina@suse.cz>
Tue, 20 Nov 2012 16:37:45 +0000 (17:37 +0100)
commit3c62602434c13744df62b3ab0ab7950cd36f24db
tree86071cf15ca76b3e0d195efd0dc199854df35deb
parent4a200c3b9a40242652b5734630bdd0bcf3aca75f
HID: i2c-hid: fix memory leak during probe

In case we are returning from i2c_hid_probe() through the 'err' or
'err_mem_free' labels, there is noone freeing the buffers allocated by
i2c_hid_alloc_buffers().

Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/i2c-hid/i2c-hid.c