* [PATCH] 9p: return NULL when trans not found
@ 2007-10-26 23:06 Latchesar Ionkov
0 siblings, 0 replies; only message in thread
From: Latchesar Ionkov @ 2007-10-26 23:06 UTC (permalink / raw)
To: v9fs-developer; +Cc: linux-fsdevel, linux-kernel
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>
---
commit 25ed88ed319e40fb6426e2aaefcc5f136aadd4ee
tree 281feda9127a85178d44faca59a13645d08e314d
parent 0c0b7fa3d4e80ab3e4e69b8a55661f649d1b41ff
author Latchesar Ionkov <lucho@ionkov.net> 1193438318 -0600
committer Latchesar Ionkov <lucho@ionkov.net> 1193438318 -0600
net/9p/mod.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/9p/mod.c b/net/9p/mod.c
index 41d70f4..8f9763a 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);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-26 23:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-26 23:06 [PATCH] 9p: return NULL when trans not found Latchesar Ionkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).