Lines Matching refs:ret
197 int i, cnt, ret; in klp_resolve_symbols() local
253 ret = klp_find_object_symbol(sym_vmlinux ? NULL : sym_objname, in klp_resolve_symbols()
255 if (ret) in klp_resolve_symbols()
256 return ret; in klp_resolve_symbols()
292 int cnt, ret; in klp_apply_section_relocs() local
312 ret = klp_resolve_symbols(sechdrs, strtab, symndx, sec, sec_objname); in klp_apply_section_relocs()
313 if (ret) in klp_apply_section_relocs()
314 return ret; in klp_apply_section_relocs()
337 int ret; in enabled_store() local
340 ret = kstrtobool(buf, &enabled); in enabled_store()
341 if (ret) in enabled_store()
342 return ret; in enabled_store()
350 ret = -EINVAL; in enabled_store()
364 ret = __klp_disable_patch(patch); in enabled_store()
366 ret = -EINVAL; in enabled_store()
371 if (ret) in enabled_store()
372 return ret; in enabled_store()
399 int ret; in force_store() local
402 ret = kstrtobool(buf, &val); in force_store()
403 if (ret) in force_store()
404 return ret; in force_store()
768 int i, ret; in klp_apply_object_relocs() local
777 ret = klp_apply_section_relocs(patch->mod, info->sechdrs, in klp_apply_object_relocs()
781 if (ret) in klp_apply_object_relocs()
782 return ret; in klp_apply_object_relocs()
793 int ret; in klp_init_object_loaded() local
802 ret = klp_apply_object_relocs(patch, obj); in klp_init_object_loaded()
803 if (ret) in klp_init_object_loaded()
804 return ret; in klp_init_object_loaded()
808 ret = klp_find_object_symbol(obj->name, func->old_name, in klp_init_object_loaded()
811 if (ret) in klp_init_object_loaded()
812 return ret; in klp_init_object_loaded()
814 ret = kallsyms_lookup_size_offset((unsigned long)func->old_func, in klp_init_object_loaded()
816 if (!ret) { in klp_init_object_loaded()
825 ret = kallsyms_lookup_size_offset((unsigned long)func->new_func, in klp_init_object_loaded()
827 if (!ret) { in klp_init_object_loaded()
840 int ret; in klp_init_object() local
852 ret = kobject_add(&obj->kobj, &patch->kobj, "%s", name); in klp_init_object()
853 if (ret) in klp_init_object()
854 return ret; in klp_init_object()
857 ret = klp_init_func(obj, func); in klp_init_object()
858 if (ret) in klp_init_object()
859 return ret; in klp_init_object()
863 ret = klp_init_object_loaded(patch, obj); in klp_init_object()
865 return ret; in klp_init_object()
908 int ret; in klp_init_patch() local
910 ret = kobject_add(&patch->kobj, klp_root_kobj, "%s", patch->mod->name); in klp_init_patch()
911 if (ret) in klp_init_patch()
912 return ret; in klp_init_patch()
915 ret = klp_add_nops(patch); in klp_init_patch()
916 if (ret) in klp_init_patch()
917 return ret; in klp_init_patch()
921 ret = klp_init_object(patch, obj); in klp_init_patch()
922 if (ret) in klp_init_patch()
923 return ret; in klp_init_patch()
966 int ret; in __klp_enable_patch() local
991 ret = klp_pre_patch_callback(obj); in __klp_enable_patch()
992 if (ret) { in __klp_enable_patch()
998 ret = klp_patch_object(obj); in __klp_enable_patch()
999 if (ret) { in __klp_enable_patch()
1015 return ret; in __klp_enable_patch()
1033 int ret; in klp_enable_patch() local
1075 ret = klp_init_patch(patch); in klp_enable_patch()
1076 if (ret) in klp_enable_patch()
1079 ret = __klp_enable_patch(patch); in klp_enable_patch()
1080 if (ret) in klp_enable_patch()
1094 return ret; in klp_enable_patch()
1184 int ret; in klp_module_coming() local
1211 ret = klp_init_object_loaded(patch, obj); in klp_module_coming()
1212 if (ret) { in klp_module_coming()
1214 patch->mod->name, obj->mod->name, ret); in klp_module_coming()
1221 ret = klp_pre_patch_callback(obj); in klp_module_coming()
1222 if (ret) { in klp_module_coming()
1228 ret = klp_patch_object(obj); in klp_module_coming()
1229 if (ret) { in klp_module_coming()
1231 patch->mod->name, obj->mod->name, ret); in klp_module_coming()
1260 return ret; in klp_module_coming()