Bluetooth: hidp: Only free input device if failed register
authorPeter Hurley <peter@hurleysoftware.com>
Fri, 5 Aug 2011 14:51:50 +0000 (10:51 -0400)
committerJaikumar Ganesh <jaikumar@google.com>
Fri, 12 Aug 2011 01:42:27 +0000 (18:42 -0700)
commite5e416a4151ee182a05bb3cbbbda8f4d54e83400
tree392d575a9772fa9419f2628d2cf3db31dcf97300
parent6b7f77eb6a2bb8197813d69952fee89d91a073b4
Bluetooth: hidp: Only free input device if failed register

When an hidp connection is added for a boot protocol input
device, only free the allocated device if device registration fails.
Subsequent failures should only unregister the device (the input
device api documents that unregister will also free the allocated
device).

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/hidp/core.c