Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0227c7b5 authored by Wei Yongjun's avatar Wei Yongjun Committed by Gustavo Padovan
Browse files

Bluetooth: fix error return code in rfcomm_add_listener()



Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent feb94d3d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2004,8 +2004,10 @@ static int rfcomm_add_listener(bdaddr_t *ba)

	/* Add listening session */
	s = rfcomm_session_add(sock, BT_LISTEN);
	if (!s)
	if (!s) {
		err = -ENOMEM;
		goto failed;
	}

	return 0;
failed: