Commit e57d758a authored by Luiz Augusto von Dentz's avatar Luiz Augusto von Dentz Committed by Gustavo F. Padovan

Bluetooth: Fix using uninitialized variable

+ 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: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
parent 9498ba7a
...@@ -196,7 +196,7 @@ static DEVICE_ATTR(channel, S_IRUGO, show_channel, NULL); ...@@ -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) static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
{ {
struct rfcomm_dev *dev, *entry; struct rfcomm_dev *dev, *entry;
struct list_head *head = &rfcomm_dev_list, *p; struct list_head *head = &rfcomm_dev_list;
int err = 0; int err = 0;
BT_DBG("id %d channel %d", req->dev_id, req->channel); BT_DBG("id %d channel %d", req->dev_id, req->channel);
...@@ -215,7 +215,7 @@ static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc) ...@@ -215,7 +215,7 @@ static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
break; break;
dev->id++; dev->id++;
head = p; head = &entry->list;
} }
} else { } else {
dev->id = req->dev_id; dev->id = req->dev_id;
...@@ -229,7 +229,7 @@ static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc) ...@@ -229,7 +229,7 @@ static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
if (entry->id > dev->id - 1) if (entry->id > dev->id - 1)
break; break;
head = p; head = &entry->list;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment