summaryrefslogtreecommitdiff
path: root/net/bluetooth/rfcomm/tty.c
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2020-05-21 01:01:17 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2020-05-21 01:01:17 +0200
commit128f7491311b744f54bcd163be5e38839943bcd6 (patch)
treeb540d654a59343bd767b3c6d3c75e2925e48eec5 /net/bluetooth/rfcomm/tty.c
parent4a31b8a3519d5dde0eacbb088b0d45c83732535b (diff)
parent5efe91c00c98c72cbe8475caa6e72c520199e32b (diff)
Merge tag 'v4.4.220' into toradex_vf_4.4-next
This is the 4.4.220 stable release
Diffstat (limited to 'net/bluetooth/rfcomm/tty.c')
-rw-r--r--net/bluetooth/rfcomm/tty.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index 8e385a0ae60e..939fbf7b352d 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -413,10 +413,8 @@ static int __rfcomm_create_dev(struct sock *sk, void __user *arg)
dlc = rfcomm_dlc_exists(&req.src, &req.dst, req.channel);
if (IS_ERR(dlc))
return PTR_ERR(dlc);
- else if (dlc) {
- rfcomm_dlc_put(dlc);
+ if (dlc)
return -EBUSY;
- }
dlc = rfcomm_dlc_alloc(GFP_KERNEL);
if (!dlc)
return -ENOMEM;