Skip to content

Commit

Permalink
Bluetooth: Fix using uninitialized variable
Browse files Browse the repository at this point in the history
+ src/net/bluetooth/rfcomm/tty.c: warning: 'p' is used uninitialized in this
       function:  => 218
+ src/net/bluetooth/rfcomm/tty.c: warning: 'p' may be used uninitialized in
       this function:  => 218

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
  • Loading branch information
Luiz Augusto von Dentz authored and Gustavo F. Padovan committed Mar 8, 2012
1 parent 9498ba7 commit e57d758
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/bluetooth/rfcomm/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ static DEVICE_ATTR(channel, S_IRUGO, show_channel, NULL);
static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
{
struct rfcomm_dev *dev, *entry;
struct list_head *head = &rfcomm_dev_list, *p;
struct list_head *head = &rfcomm_dev_list;
int err = 0;

BT_DBG("id %d channel %d", req->dev_id, req->channel);
Expand All @@ -215,7 +215,7 @@ static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
break;

dev->id++;
head = p;
head = &entry->list;
}
} else {
dev->id = req->dev_id;
Expand All @@ -229,7 +229,7 @@ static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
if (entry->id > dev->id - 1)
break;

head = p;
head = &entry->list;
}
}

Expand Down

0 comments on commit e57d758

Please sign in to comment.