提交 0227c7b5 编写于 作者: W Wei Yongjun 提交者: Gustavo Padovan

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: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
上级 feb94d3d
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册