]> git.baikalelectronics.ru Git - kernel.git/commit
HID: sony: Prevent the freeing of an unitialized ida value
authorFrank Praznik <frank.praznik@oh.rr.com>
Wed, 6 May 2015 00:47:28 +0000 (20:47 -0400)
committerJiri Kosina <jkosina@suse.cz>
Thu, 7 May 2015 08:41:34 +0000 (10:41 +0200)
commit74c215b1f5899f81781c5c4ca35380ba4e137130
tree999270eca3d62fc6abd3e81100c0e7347e17d76e
parent972ae7043d88bf320888aca7fefa53c2d836d4a5
HID: sony: Prevent the freeing of an unitialized ida value

sony_allocate_output_report() was being called before sony_set_device_id()
which meant that an unallocated ida value was was freed if the output
report allocation failed and the probe function jumped to err_stop.

Do the device ID allocation before the output report allocation to avoid
freeing an unallocated value in case of a failure.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sony.c