Lines Matching refs:rc
213 int i, j, rc; in dcssblk_is_continuous() local
248 rc = -EINVAL; in dcssblk_is_continuous()
262 rc = -EINVAL; in dcssblk_is_continuous()
267 rc = 0; in dcssblk_is_continuous()
270 return rc; in dcssblk_is_continuous()
279 int rc; in dcssblk_load_segment() local
296 rc = segment_load(name, SEGMENT_SHARED, in dcssblk_load_segment()
298 if (rc < 0) { in dcssblk_load_segment()
299 segment_warning(rc, (*seg_info)->segment_name); in dcssblk_load_segment()
303 (*seg_info)->segment_type = rc; in dcssblk_load_segment()
305 return rc; in dcssblk_load_segment()
326 int rc; in dcssblk_shared_store() local
333 rc = -EBUSY; in dcssblk_shared_store()
339 rc = segment_modify_shared(entry->segment_name, in dcssblk_shared_store()
341 if (rc < 0) { in dcssblk_shared_store()
342 BUG_ON(rc == -EINVAL); in dcssblk_shared_store()
343 if (rc != -EAGAIN) in dcssblk_shared_store()
360 rc = -EINVAL; in dcssblk_shared_store()
364 rc = segment_modify_shared(entry->segment_name, in dcssblk_shared_store()
366 if (rc < 0) { in dcssblk_shared_store()
367 BUG_ON(rc == -EINVAL); in dcssblk_shared_store()
368 if (rc != -EAGAIN) in dcssblk_shared_store()
375 rc = -EINVAL; in dcssblk_shared_store()
378 rc = count; in dcssblk_shared_store()
401 return rc; in dcssblk_shared_store()
404 return rc; in dcssblk_shared_store()
524 int rc, i, j, num_of_segments; in dcssblk_add_store() local
533 rc = -EINVAL; in dcssblk_add_store()
537 rc = -ENAMETOOLONG; in dcssblk_add_store()
543 rc = -ENOMEM; in dcssblk_add_store()
560 rc = -ENAMETOOLONG; in dcssblk_add_store()
564 rc = dcssblk_load_segment(local_buf, &seg_info); in dcssblk_add_store()
565 if (rc < 0) in dcssblk_add_store()
574 rc = -ENOMEM; in dcssblk_add_store()
591 rc = -ENAMETOOLONG; in dcssblk_add_store()
596 rc = dcssblk_is_continuous(dev_info); in dcssblk_add_store()
597 if (rc < 0) in dcssblk_add_store()
609 rc = -ENOMEM; in dcssblk_add_store()
635 rc = -EEXIST; in dcssblk_add_store()
638 rc = dcssblk_assign_free_minor(dev_info); in dcssblk_add_store()
639 if (rc) in dcssblk_add_store()
646 rc = -ENODEV; in dcssblk_add_store()
652 rc = device_register(&dev_info->dev); in dcssblk_add_store()
653 if (rc) in dcssblk_add_store()
670 rc = count; in dcssblk_add_store()
703 return rc; in dcssblk_add_store()
714 int rc, i; in dcssblk_remove_store() local
732 rc = -ENAMETOOLONG; in dcssblk_remove_store()
742 rc = -ENODEV; in dcssblk_remove_store()
749 rc = -EBUSY; in dcssblk_remove_store()
767 rc = count; in dcssblk_remove_store()
770 return rc; in dcssblk_remove_store()
777 int rc; in dcssblk_open() local
781 rc = -ENODEV; in dcssblk_open()
786 rc = 0; in dcssblk_open()
788 return rc; in dcssblk_open()
907 int rc, i, j, k; in dcssblk_check_params() local
921 rc = dcssblk_add_store(dcssblk_root_dev, NULL, buf, j-i); in dcssblk_check_params()
922 if ((rc >= 0) && (dcssblk_segments[j] == '(')) { in dcssblk_check_params()
952 int rc = 0; in dcssblk_freeze() local
960 rc = -EINVAL; in dcssblk_freeze()
963 rc = -EINVAL; in dcssblk_freeze()
966 if (rc) in dcssblk_freeze()
969 if (rc) in dcssblk_freeze()
973 return rc; in dcssblk_freeze()
981 int rc = 0; in dcssblk_restore() local
986 rc = segment_load(entry->segment_name, SEGMENT_SHARED, in dcssblk_restore()
988 if (rc < 0) { in dcssblk_restore()
990 segment_warning(rc, entry->segment_name); in dcssblk_restore()
1042 int rc; in dcssblk_init() local
1044 rc = platform_driver_register(&dcssblk_pdrv); in dcssblk_init()
1045 if (rc) in dcssblk_init()
1046 return rc; in dcssblk_init()
1051 rc = PTR_ERR(dcssblk_pdev); in dcssblk_init()
1057 rc = PTR_ERR(dcssblk_root_dev); in dcssblk_init()
1060 rc = device_create_file(dcssblk_root_dev, &dev_attr_add); in dcssblk_init()
1061 if (rc) in dcssblk_init()
1063 rc = device_create_file(dcssblk_root_dev, &dev_attr_remove); in dcssblk_init()
1064 if (rc) in dcssblk_init()
1066 rc = register_blkdev(0, DCSSBLK_NAME); in dcssblk_init()
1067 if (rc < 0) in dcssblk_init()
1069 dcssblk_major = rc; in dcssblk_init()
1081 return rc; in dcssblk_init()