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)
committerGustavo F. Padovan <padovan@profusion.mobi>
Thu, 11 Aug 2011 22:50:28 +0000 (19:50 -0300)
commit615aedd6e5add8104f031b0d547285652d04d330
tree9c35724c899a9e468538b03e3dfffbe8ecfd63dc
parent1c97e94c0b7c56319754ee6f9ccd2e93fe1ee2b3
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