Skip to contentSkip to conversation

Bluetooth: hidp: Don't release device ref if never held

PATCH In review Peter Hurley 2 participants 2 messages Aug 5, 2011 – Aug 11, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/4 Bluetooth: hidp: Don't release device ref if never held

When an hidp connection is added for a boot protocol input device, don't release a device reference that was never acquired. The device reference is acquired when the session is linked to the session list (which hasn't happened yet when hidp_setup_input is called).

---
 net/bluetooth/hidp/core.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
net/bluetooth/hidp/core.c +0 -1
index a859f90..fb68f34 100644
@@ -844,7 +844,6 @@ static int hidp_setup_input(struct hidp_session *session,
 	if (err < 0) {
 		input_free_device(input);
 		session->input = NULL;
-		hci_conn_put_device(session->conn);
 		return err;
 	}
 
Signature · 1 line
1.7.4.1
#1 lore raw

Hi Peter,

Quoted 10 lines · Peter Hurley

When an hidp connection is added for a boot protocol input device, don't release a device reference that was never acquired. The device reference is acquired when the session is linked to the session list (which hasn't happened yet when hidp_setup_input is called).

---
 net/bluetooth/hidp/core.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

All four patches applied. Thanks.

Gustavo