Lines Matching refs:rc
24 ssize_t rc = 0; in format_show() local
32 rc = of_property_read_string(node, "format", &format); in format_show()
33 if (rc) in format_show()
34 return rc; in format_show()
36 rc = sprintf(buf, "%s\n", format); in format_show()
40 return rc; in format_show()
48 int rc; in size_show() local
50 rc = secvar_ops->get(kobj->name, strlen(kobj->name) + 1, NULL, &dsize); in size_show()
51 if (rc) { in size_show()
53 rc); in size_show()
54 return rc; in size_show()
66 int rc; in data_read() local
68 rc = secvar_ops->get(kobj->name, strlen(kobj->name) + 1, NULL, &dsize); in data_read()
69 if (rc) { in data_read()
70 pr_err("Error getting %s variable size %d\n", kobj->name, rc); in data_read()
71 return rc; in data_read()
79 rc = secvar_ops->get(kobj->name, strlen(kobj->name) + 1, data, &dsize); in data_read()
80 if (rc) { in data_read()
81 pr_err("Error getting %s variable %d\n", kobj->name, rc); in data_read()
85 rc = memory_read_from_buffer(buf, count, &off, data, dsize); in data_read()
89 return rc; in data_read()
96 int rc; in update_write() local
99 rc = secvar_ops->set(kobj->name, strlen(kobj->name) + 1, buf, count); in update_write()
100 if (rc) { in update_write()
101 pr_err("Error setting the %s variable %d\n", kobj->name, rc); in update_write()
102 return rc; in update_write()
143 int rc = 0; in update_kobj_size() local
147 rc = -ENODEV; in update_kobj_size()
151 rc = of_property_read_u64(node, "max-var-size", &varsize); in update_kobj_size()
152 if (rc) in update_kobj_size()
161 return rc; in update_kobj_size()
169 int rc; in secvar_sysfs_load() local
176 rc = secvar_ops->get_next(name, &namesize, NAME_MAX_SIZE); in secvar_sysfs_load()
177 if (rc) { in secvar_sysfs_load()
178 if (rc != -ENOENT) in secvar_sysfs_load()
180 rc); in secvar_sysfs_load()
186 rc = -ENOMEM; in secvar_sysfs_load()
192 rc = kobject_add(kobj, &secvar_kset->kobj, "%s", name); in secvar_sysfs_load()
193 if (rc) { in secvar_sysfs_load()
194 pr_warn("kobject_add error %d for attribute: %s\n", rc, in secvar_sysfs_load()
203 } while (!rc); in secvar_sysfs_load()
206 return rc; in secvar_sysfs_load()
211 int rc; in secvar_sysfs_init() local
224 rc = sysfs_create_file(secvar_kobj, &format_attr.attr); in secvar_sysfs_init()
225 if (rc) { in secvar_sysfs_init()
237 rc = update_kobj_size(); in secvar_sysfs_init()
238 if (rc) { in secvar_sysfs_init()
240 return rc; in secvar_sysfs_init()