Bluetooth: Fix L2CAP error return used for failed channel lookups
authorJohan Hedberg <johan.hedberg@intel.com>
Mon, 16 Sep 2013 10:05:14 +0000 (13:05 +0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Wed, 18 Sep 2013 21:43:40 +0000 (16:43 -0500)
commit21870b523e847432312a1b62239ad139369e9f9f
treeda87469543c36e40c7eeb1ad1b22d14c16ec06cf
parentdc280801da1006cd9c702cfaae7ae677fdbc5b53
Bluetooth: Fix L2CAP error return used for failed channel lookups

The EFAULT error should only be used for memory address related errors
and ENOENT might be needed for other purposes than invalid CID errors.
This patch fixes the l2cap_config_req, l2cap_connect_create_rsp and
l2cap_create_channel_req handlers to use the unique EBADSLT error to
indicate failed lookups on a given CID.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/l2cap_core.c