aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2012-03-07 13:20:14 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2012-03-08 00:20:22 -0500
commite57d758ae8e8f00e80f233c823aeeef34bd92796 (patch)
tree0e97a6233731b3865039cad385fdd077dc3bc89a /net/bluetooth
parent9498ba7a1d38d42eef4ef6d906ab1743c9f0fd6f (diff)
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: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/rfcomm/tty.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index a2d4f5122a6a..c179734f143f 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -196,7 +196,7 @@ static DEVICE_ATTR(channel, S_IRUGO, show_channel, NULL);
196static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc) 196static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
197{ 197{
198 struct rfcomm_dev *dev, *entry; 198 struct rfcomm_dev *dev, *entry;
199 struct list_head *head = &rfcomm_dev_list, *p; 199 struct list_head *head = &rfcomm_dev_list;
200 int err = 0; 200 int err = 0;
201 201
202 BT_DBG("id %d channel %d", req->dev_id, req->channel); 202 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 break; 215 break;
216 216
217 dev->id++; 217 dev->id++;
218 head = p; 218 head = &entry->list;
219 } 219 }
220 } else { 220 } else {
221 dev->id = req->dev_id; 221 dev->id = req->dev_id;
@@ -229,7 +229,7 @@ static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
229 if (entry->id > dev->id - 1) 229 if (entry->id > dev->id - 1)
230 break; 230 break;
231 231
232 head = p; 232 head = &entry->list;
233 } 233 }
234 } 234 }
235 235