mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
9p: return NULL when trans not found
v9fs_match_trans function returns arbitrary transport module instead of NULL when the requested transport is not registered. This patch modifies the function to return NULL in that case. Signed-off-by: Latchesar Ionkov <lucho@ionkov.net> Acked-by: Eric Van Hensbergen <ericvh@gmail.com>
This commit is contained in:
parent
8999e04f3b
commit
dd1a458412
@ -76,9 +76,9 @@ struct p9_trans_module *v9fs_match_trans(const substring_t *name)
|
||||
list_for_each(p, &v9fs_trans_list) {
|
||||
t = list_entry(p, struct p9_trans_module, list);
|
||||
if (strncmp(t->name, name->from, name->to-name->from) == 0)
|
||||
break;
|
||||
return t;
|
||||
}
|
||||
return t;
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(v9fs_match_trans);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user