summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/cmtp/core.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-01-07 15:54:25 +0100
committerTakashi Iwai <tiwai@suse.de>2015-01-07 15:54:25 +0100
commit3b6fe95a07a1bb13784df866aa75c7bcc28529e3 (patch)
tree9d27a8823f95be0274fa983021210cb70d414075 /net/bluetooth/cmtp/core.c
parent4f7946eca787baa0f66b4a508595b768a4772f3f (diff)
parent5618955c4269b07c8177f88a8075d4879e74cd27 (diff)
downloadlinux-3b6fe95a07a1bb13784df866aa75c7bcc28529e3.tar.bz2
Merge branch 'topic/pci-cleanup' into for-next
Diffstat (limited to 'net/bluetooth/cmtp/core.c')
-rw-r--r--net/bluetooth/cmtp/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/cmtp/core.c b/net/bluetooth/cmtp/core.c
index 67fe5e84e68f..278a194e6af4 100644
--- a/net/bluetooth/cmtp/core.c
+++ b/net/bluetooth/cmtp/core.c
@@ -334,6 +334,9 @@ int cmtp_add_connection(struct cmtp_connadd_req *req, struct socket *sock)
BT_DBG("");
+ if (!l2cap_is_socket(sock))
+ return -EBADFD;
+
session = kzalloc(sizeof(struct cmtp_session), GFP_KERNEL);
if (!session)
return -ENOMEM;