aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLatchesar Ionkov <lucho@ionkov.net>2007-11-06 09:02:53 -0500
committerEric Van Hensbergen <ericvh@gmail.com>2007-11-06 09:02:53 -0500
commitdd1a458412c358f8b4550d7e7df88982c88ce408 (patch)
tree71edabbbea4b8df6748b652c0e561f819f003bd8 /net
parent8999e04f3b7930f0c6f091a541237de51d8dd372 (diff)
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>
Diffstat (limited to 'net')
-rw-r--r--net/9p/mod.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/9p/mod.c b/net/9p/mod.c
index 41d70f47375d..8f9763a9dc12 100644
--- a/net/9p/mod.c
+++ b/net/9p/mod.c
@@ -76,9 +76,9 @@ struct p9_trans_module *v9fs_match_trans(const substring_t *name)
76 list_for_each(p, &v9fs_trans_list) { 76 list_for_each(p, &v9fs_trans_list) {
77 t = list_entry(p, struct p9_trans_module, list); 77 t = list_entry(p, struct p9_trans_module, list);
78 if (strncmp(t->name, name->from, name->to-name->from) == 0) 78 if (strncmp(t->name, name->from, name->to-name->from) == 0)
79 break; 79 return t;
80 } 80 }
81 return t; 81 return NULL;
82} 82}
83EXPORT_SYMBOL(v9fs_match_trans); 83EXPORT_SYMBOL(v9fs_match_trans);
84 84