Lines Matching refs:rc
212 int i, j, rc; in dcssblk_is_continuous() local
247 rc = -EINVAL; in dcssblk_is_continuous()
261 rc = -EINVAL; in dcssblk_is_continuous()
266 rc = 0; in dcssblk_is_continuous()
269 return rc; in dcssblk_is_continuous()
278 int rc; in dcssblk_load_segment() local
295 rc = segment_load(name, SEGMENT_SHARED, in dcssblk_load_segment()
297 if (rc < 0) { in dcssblk_load_segment()
298 segment_warning(rc, (*seg_info)->segment_name); in dcssblk_load_segment()
302 (*seg_info)->segment_type = rc; in dcssblk_load_segment()
304 return rc; in dcssblk_load_segment()
325 int rc; in dcssblk_shared_store() local
332 rc = -EBUSY; in dcssblk_shared_store()
338 rc = segment_modify_shared(entry->segment_name, in dcssblk_shared_store()
340 if (rc < 0) { in dcssblk_shared_store()
341 BUG_ON(rc == -EINVAL); in dcssblk_shared_store()
342 if (rc != -EAGAIN) in dcssblk_shared_store()
359 rc = -EINVAL; in dcssblk_shared_store()
363 rc = segment_modify_shared(entry->segment_name, in dcssblk_shared_store()
365 if (rc < 0) { in dcssblk_shared_store()
366 BUG_ON(rc == -EINVAL); in dcssblk_shared_store()
367 if (rc != -EAGAIN) in dcssblk_shared_store()
374 rc = -EINVAL; in dcssblk_shared_store()
377 rc = count; in dcssblk_shared_store()
400 return rc; in dcssblk_shared_store()
403 return rc; in dcssblk_shared_store()
523 int rc, i, j, num_of_segments; in dcssblk_add_store() local
532 rc = -EINVAL; in dcssblk_add_store()
536 rc = -ENAMETOOLONG; in dcssblk_add_store()
542 rc = -ENOMEM; in dcssblk_add_store()
559 rc = -ENAMETOOLONG; in dcssblk_add_store()
563 rc = dcssblk_load_segment(local_buf, &seg_info); in dcssblk_add_store()
564 if (rc < 0) in dcssblk_add_store()
573 rc = -ENOMEM; in dcssblk_add_store()
590 rc = -ENAMETOOLONG; in dcssblk_add_store()
595 rc = dcssblk_is_continuous(dev_info); in dcssblk_add_store()
596 if (rc < 0) in dcssblk_add_store()
608 rc = -ENOMEM; in dcssblk_add_store()
634 rc = -EEXIST; in dcssblk_add_store()
637 rc = dcssblk_assign_free_minor(dev_info); in dcssblk_add_store()
638 if (rc) in dcssblk_add_store()
645 rc = -ENODEV; in dcssblk_add_store()
651 rc = device_register(&dev_info->dev); in dcssblk_add_store()
652 if (rc) in dcssblk_add_store()
669 rc = count; in dcssblk_add_store()
702 return rc; in dcssblk_add_store()
713 int rc, i; in dcssblk_remove_store() local
731 rc = -ENAMETOOLONG; in dcssblk_remove_store()
741 rc = -ENODEV; in dcssblk_remove_store()
748 rc = -EBUSY; in dcssblk_remove_store()
766 rc = count; in dcssblk_remove_store()
769 return rc; in dcssblk_remove_store()
776 int rc; in dcssblk_open() local
780 rc = -ENODEV; in dcssblk_open()
785 rc = 0; in dcssblk_open()
787 return rc; in dcssblk_open()
901 int rc, i, j, k; in dcssblk_check_params() local
915 rc = dcssblk_add_store(dcssblk_root_dev, NULL, buf, j-i); in dcssblk_check_params()
916 if ((rc >= 0) && (dcssblk_segments[j] == '(')) { in dcssblk_check_params()
946 int rc = 0; in dcssblk_freeze() local
954 rc = -EINVAL; in dcssblk_freeze()
957 rc = -EINVAL; in dcssblk_freeze()
960 if (rc) in dcssblk_freeze()
963 if (rc) in dcssblk_freeze()
967 return rc; in dcssblk_freeze()
975 int rc = 0; in dcssblk_restore() local
980 rc = segment_load(entry->segment_name, SEGMENT_SHARED, in dcssblk_restore()
982 if (rc < 0) { in dcssblk_restore()
984 segment_warning(rc, entry->segment_name); in dcssblk_restore()
1036 int rc; in dcssblk_init() local
1038 rc = platform_driver_register(&dcssblk_pdrv); in dcssblk_init()
1039 if (rc) in dcssblk_init()
1040 return rc; in dcssblk_init()
1045 rc = PTR_ERR(dcssblk_pdev); in dcssblk_init()
1051 rc = PTR_ERR(dcssblk_root_dev); in dcssblk_init()
1054 rc = device_create_file(dcssblk_root_dev, &dev_attr_add); in dcssblk_init()
1055 if (rc) in dcssblk_init()
1057 rc = device_create_file(dcssblk_root_dev, &dev_attr_remove); in dcssblk_init()
1058 if (rc) in dcssblk_init()
1060 rc = register_blkdev(0, DCSSBLK_NAME); in dcssblk_init()
1061 if (rc < 0) in dcssblk_init()
1063 dcssblk_major = rc; in dcssblk_init()
1075 return rc; in dcssblk_init()