Lines Matching refs:rc
42 int rc; in size_show() local
44 rc = secvar_ops->get(kobj->name, strlen(kobj->name) + 1, NULL, &dsize); in size_show()
45 if (rc) { in size_show()
46 if (rc != -ENOENT) in size_show()
47 pr_err("Error retrieving %s variable size %d\n", kobj->name, rc); in size_show()
48 return rc; in size_show()
60 int rc; in data_read() local
62 rc = secvar_ops->get(kobj->name, strlen(kobj->name) + 1, NULL, &dsize); in data_read()
63 if (rc) { in data_read()
64 if (rc != -ENOENT) in data_read()
65 pr_err("Error getting %s variable size %d\n", kobj->name, rc); in data_read()
66 return rc; in data_read()
74 rc = secvar_ops->get(kobj->name, strlen(kobj->name) + 1, data, &dsize); in data_read()
75 if (rc) { in data_read()
76 pr_err("Error getting %s variable %d\n", kobj->name, rc); in data_read()
80 rc = memory_read_from_buffer(buf, count, &off, data, dsize); in data_read()
84 return rc; in data_read()
91 int rc; in update_write() local
94 rc = secvar_ops->set(kobj->name, strlen(kobj->name) + 1, buf, count); in update_write()
95 if (rc) { in update_write()
96 pr_err("Error setting the %s variable %d\n", kobj->name, rc); in update_write()
97 return rc; in update_write()
137 int rc = secvar_ops->max_size(&varsize); in update_kobj_size() local
139 if (rc) in update_kobj_size()
140 return rc; in update_kobj_size()
164 int rc; in add_var() local
172 rc = kobject_add(kobj, &secvar_kset->kobj, "%s", name); in add_var()
173 if (rc) { in add_var()
174 pr_warn("kobject_add error %d for attribute: %s\n", rc, in add_var()
177 return rc; in add_var()
188 int rc; in secvar_sysfs_load() local
195 rc = secvar_ops->get_next(name, &namesize, NAME_MAX_SIZE); in secvar_sysfs_load()
196 if (rc) { in secvar_sysfs_load()
197 if (rc != -ENOENT) in secvar_sysfs_load()
198 pr_err("error getting secvar from firmware %d\n", rc); in secvar_sysfs_load()
200 rc = 0; in secvar_sysfs_load()
205 rc = add_var(name); in secvar_sysfs_load()
206 } while (!rc); in secvar_sysfs_load()
209 return rc; in secvar_sysfs_load()
215 int rc; in secvar_sysfs_load_static() local
218 rc = add_var(*name_ptr); in secvar_sysfs_load_static()
219 if (rc) in secvar_sysfs_load_static()
220 return rc; in secvar_sysfs_load_static()
230 int rc; in secvar_sysfs_init() local
243 rc = sysfs_create_file(secvar_kobj, &format_attr.attr); in secvar_sysfs_init()
244 if (rc) { in secvar_sysfs_init()
246 rc = -ENOMEM; in secvar_sysfs_init()
253 rc = -ENOMEM; in secvar_sysfs_init()
257 rc = update_kobj_size(); in secvar_sysfs_init()
258 if (rc) { in secvar_sysfs_init()
263 rc = secvar_sysfs_config(secvar_kobj); in secvar_sysfs_init()
264 if (rc) { in secvar_sysfs_init()
270 rc = secvar_sysfs_load(); in secvar_sysfs_init()
272 rc = secvar_sysfs_load_static(); in secvar_sysfs_init()
274 if (rc) { in secvar_sysfs_init()
290 return rc; in secvar_sysfs_init()