HID: thingm: set the proper error code before leaving
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Tue, 2 Sep 2014 19:50:43 +0000 (15:50 -0400)
committerJiri Kosina <jkosina@suse.cz>
Wed, 3 Sep 2014 21:46:09 +0000 (23:46 +0200)
commite4cf19ffe060e75d34c007565d0aef7189ec654e
treec18319e8e323b883689c68711674a1de828ee233
parent844817e47eef14141cf59b8d5ac08dd11c0a9189
HID: thingm: set the proper error code before leaving

In case of an unsupported firmware, the driver bails out without setting
the LEDs interfaces, but forget to set the proper error code.
err is then still equal to 0 and the hid subsytem consider the device
to be in perfect shape.
When removing it, thingm_remove() tries to unbind the rgb LEDs which
has not been created, leading to a segfault.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-thingm.c
This page took 0.024622 seconds and 5 git commands to generate.