diff options
author | Wei Yongjun | 2013-03-20 20:23:37 +0800 |
---|---|---|
committer | Gustavo Padovan | 2013-03-20 14:17:52 -0300 |
commit | 0227c7b56959cd8f5edd20b6a47db86fa553e91a (patch) | |
tree | 04f7857ab3b0fe7451f648d538c8cd2a74dc11de | |
parent | feb94d3d13af7b724b353d82237ca6f503c98d62 (diff) |
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>
-rw-r--r-- | net/bluetooth/rfcomm/core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index ba93df2af71f..ca957d34b0c8 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: |