Index: linux/net/bluetooth/rfcomm/tty.c =================================================================== --- linux.orig/net/bluetooth/rfcomm/tty.c +++ linux/net/bluetooth/rfcomm/tty.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -182,6 +183,7 @@ static int rfcomm_dev_add(struct rfcomm_ { struct rfcomm_dev *dev; struct list_head *head = &rfcomm_dev_list, *p; + struct class_device *class; int err = 0; BT_DBG("id %d channel %d", req->dev_id, req->channel); @@ -261,7 +263,11 @@ out: return err; } - tty_register_device(rfcomm_tty_driver, dev->id, rfcomm_get_device(dev)); + class = tty_register_device(rfcomm_tty_driver, dev->id, rfcomm_get_device(dev)); + if (IS_ERR(class)) + printk("rfcomm_dev_add error %d\n", PTR_ERR(class)); + else + printk("rfcomm_dev_add succeeded\n"); return dev->id; }