Skip to content

Commit

Permalink
9p: return NULL when trans not found
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
lionkov authored and ericvh committed Nov 6, 2007
1 parent 8999e04 commit dd1a458
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/9p/mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit dd1a458

Please sign in to comment.