]> git.baikalelectronics.ru Git - kernel.git/commit
HID: i2c-hid: Fix error handling
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 19 Feb 2017 12:07:59 +0000 (13:07 +0100)
committerJiri Kosina <jkosina@suse.cz>
Mon, 6 Mar 2017 13:16:13 +0000 (14:16 +0100)
commitbfda2ea85e51521380c1e4009b06549b6bc959b6
tree25bb7dd98943ffcbe96a252149cd26003fdae187
parentf85abeb3b1069b595ab08e0ae112c9998a58dece
HID: i2c-hid: Fix error handling

According to error handling in this function, it is likely that some
resources should be freed before returning.
Replace 'return ret', with 'goto err'.

While at it, remove some spaces at the beginning of the lines to be more
consistent.

Fixes: ead0687fe304a ("HID: i2c-hid: support regulator power on/off")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/i2c-hid/i2c-hid.c