Explorar o código

Bluetooth: Fix PTR_ERR return of wrong pointer in hidp_setup_hid()

Return the PTR_ERR of the correct pointer.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Roel Kluin %!s(int64=16) %!d(string=hai) anos
pai
achega
971beb83ae
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      net/bluetooth/hidp/core.c

+ 1 - 1
net/bluetooth/hidp/core.c

@@ -770,7 +770,7 @@ static int hidp_setup_hid(struct hidp_session *session,
 
 	hid = hid_allocate_device();
 	if (IS_ERR(hid))
-		return PTR_ERR(session->hid);
+		return PTR_ERR(hid);
 
 	session->hid = hid;
 	session->req = req;