Loading drivers/hid/hid-roccat.c +13 −3 Original line number Diff line number Diff line Loading @@ -426,13 +426,23 @@ static int __init roccat_init(void) if (retval < 0) { pr_warn("can't get major number\n"); return retval; goto error; } cdev_init(&roccat_cdev, &roccat_ops); cdev_add(&roccat_cdev, dev_id, ROCCAT_MAX_DEVICES); retval = cdev_add(&roccat_cdev, dev_id, ROCCAT_MAX_DEVICES); if (retval < 0) { pr_warn("cannot add cdev\n"); goto cleanup_alloc_chrdev_region; } return 0; cleanup_alloc_chrdev_region: unregister_chrdev_region(dev_id, ROCCAT_MAX_DEVICES); error: return retval; } static void __exit roccat_exit(void) Loading Loading
drivers/hid/hid-roccat.c +13 −3 Original line number Diff line number Diff line Loading @@ -426,13 +426,23 @@ static int __init roccat_init(void) if (retval < 0) { pr_warn("can't get major number\n"); return retval; goto error; } cdev_init(&roccat_cdev, &roccat_ops); cdev_add(&roccat_cdev, dev_id, ROCCAT_MAX_DEVICES); retval = cdev_add(&roccat_cdev, dev_id, ROCCAT_MAX_DEVICES); if (retval < 0) { pr_warn("cannot add cdev\n"); goto cleanup_alloc_chrdev_region; } return 0; cleanup_alloc_chrdev_region: unregister_chrdev_region(dev_id, ROCCAT_MAX_DEVICES); error: return retval; } static void __exit roccat_exit(void) Loading