浏览代码

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6

David S. Miller 16 年之前
父节点
当前提交
d58b622b5d
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      net/bluetooth/hci_core.c

+ 3 - 0
net/bluetooth/hci_core.c

@@ -164,6 +164,9 @@ static inline int hci_request(struct hci_dev *hdev, void (*req)(struct hci_dev *
 {
 	int ret;
 
+	if (!test_bit(HCI_UP, &hdev->flags))
+		return -ENETDOWN;
+
 	/* Serialize all requests */
 	hci_req_lock(hdev);
 	ret = __hci_request(hdev, req, opt, timeout);