device,
"%s", tcd->device_name
);
- rc = IS_ERR(tcd->class_device) ? PTR_ERR(tcd->class_device) : 0;
- if (rc)
- goto fail_with_cdev;
- rc = sysfs_create_link(
+ sysfs_create_link(
&device->kobj,
&tcd->class_device->kobj,
tcd->mode_name
);
- if (rc)
- goto fail_with_class_device;
return tcd;
-fail_with_class_device:
- class_device_destroy(tape_class, tcd->char_device->dev);
-
fail_with_cdev:
cdev_del(tcd->char_device);