Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122703
b: refs/heads/master
c: 037322a
h: refs/heads/master
i:
  122701: 806fcfc
  122699: 430c036
  122695: 55c9244
  122687: d547593
v: v3
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed Dec 15, 2008
1 parent dd1891a commit f7d2d14
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0eae1b98cf3022715b5a6ea5f1ac6b0bd7ac4edd
refs/heads/master: 037322abe6141e32e1b1dea86a9405d52c99be5d
13 changes: 7 additions & 6 deletions trunk/net/bluetooth/rfcomm/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,18 +298,15 @@ static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
out:
write_unlock_bh(&rfcomm_dev_lock);

if (err < 0) {
kfree(dev);
return err;
}
if (err < 0)
goto free;

dev->tty_dev = tty_register_device(rfcomm_tty_driver, dev->id, NULL);

if (IS_ERR(dev->tty_dev)) {
err = PTR_ERR(dev->tty_dev);
list_del(&dev->list);
kfree(dev);
return err;
goto free;
}

dev_set_drvdata(dev->tty_dev, dev);
Expand All @@ -321,6 +318,10 @@ static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
BT_ERR("Failed to create channel attribute");

return dev->id;

free:
kfree(dev);
return err;
}

static void rfcomm_dev_del(struct rfcomm_dev *dev)
Expand Down

0 comments on commit f7d2d14

Please sign in to comment.