Commit b793cd9a authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds
Browse files

proc: save LOC in __xlate_proc_name()

parent f4bf74d8
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -166,15 +166,8 @@ static int __xlate_proc_name(const char *name, struct proc_dir_entry **ret,
	const char     		*cp = name, *next;
	struct proc_dir_entry	*de;

	de = *ret;
	if (!de)
		de = &proc_root;

	while (1) {
		next = strchr(cp, '/');
		if (!next)
			break;

	de = *ret ?: &proc_root;
	while ((next = strchr(cp, '/')) != NULL) {
		de = pde_subdir_find(de, cp, next - cp);
		if (!de) {
			WARN(1, "name '%s'\n", name);