|
@@ -242,10 +242,14 @@ static void add_conn(void *data)
|
|
|
struct hci_conn *conn = data;
|
|
|
int i;
|
|
|
|
|
|
- device_register(&conn->dev);
|
|
|
+ if (device_register(&conn->dev) < 0) {
|
|
|
+ BT_ERR("Failed to register connection device");
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
for (i = 0; conn_attrs[i]; i++)
|
|
|
- device_create_file(&conn->dev, conn_attrs[i]);
|
|
|
+ if (device_create_file(&conn->dev, conn_attrs[i]) < 0)
|
|
|
+ BT_ERR("Failed to create connection attribute");
|
|
|
}
|
|
|
|
|
|
void hci_conn_add_sysfs(struct hci_conn *conn)
|
|
@@ -312,7 +316,8 @@ int hci_register_sysfs(struct hci_dev *hdev)
|
|
|
return err;
|
|
|
|
|
|
for (i = 0; bt_attrs[i]; i++)
|
|
|
- device_create_file(dev, bt_attrs[i]);
|
|
|
+ if (device_create_file(dev, bt_attrs[i]) < 0)
|
|
|
+ BT_ERR("Failed to create device attribute");
|
|
|
|
|
|
return 0;
|
|
|
}
|