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)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:22:50 +0000 (12:22 -0800)
commitb29d25c02344b5095d7145ae14e0a28baae8e5b4
tree75403e56732008b16f614458f211f6fe9f4e8e14
parent79f1815f3053b7209d8ca38e39712936572527b2
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