提交 dd1a4584 编写于 作者: L Latchesar Ionkov 提交者: Eric Van Hensbergen

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: NLatchesar Ionkov <lucho@ionkov.net>
Acked-by: NEric Van Hensbergen <ericvh@gmail.com>
上级 8999e04f
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册