summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/rfcomm
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-03-20 20:23:37 +0800
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2013-03-20 14:17:52 -0300
commit0227c7b56959cd8f5edd20b6a47db86fa553e91a (patch)
tree04f7857ab3b0fe7451f648d538c8cd2a74dc11de /net/bluetooth/rfcomm
parentfeb94d3d13af7b724b353d82237ca6f503c98d62 (diff)
downloadop-kernel-dev-0227c7b56959cd8f5edd20b6a47db86fa553e91a.zip
op-kernel-dev-0227c7b56959cd8f5edd20b6a47db86fa553e91a.tar.gz
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: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/rfcomm')
-rw-r--r--net/bluetooth/rfcomm/core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index ba93df2..ca957d3 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -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:
OpenPOWER on IntegriCloud