From: Latchesar Ionkov Date: Tue, 6 Nov 2007 14:02:53 +0000 (-0600) Subject: 9p: return NULL when trans not found X-Git-Tag: v2.6.24-rc2~2^2~1 X-Git-Url: http://bbs.cooldavid.org/git/?a=commitdiff_plain;h=dd1a458412c358f8b4550d7e7df88982c88ce408;p=net-next-2.6.git 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 Acked-by: Eric Van Hensbergen --- diff --git a/net/9p/mod.c b/net/9p/mod.c index 41d70f47375..8f9763a9dc1 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) 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);