projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libata: bitmask based pci init functions for one or two ports
[powerpc.git]
/
fs
/
9p
/
v9fs.c
diff --git
a/fs/9p/v9fs.c
b/fs/9p/v9fs.c
index
13bdbba
..
82303f3
100644
(file)
--- a/
fs/9p/v9fs.c
+++ b/
fs/9p/v9fs.c
@@
-303,7
+303,13
@@
v9fs_session_init(struct v9fs_session_info *v9ses,
goto SessCleanUp;
};
goto SessCleanUp;
};
- v9ses->transport = trans_proto;
+ v9ses->transport = kmalloc(sizeof(*v9ses->transport), GFP_KERNEL);
+ if (!v9ses->transport) {
+ retval = -ENOMEM;
+ goto SessCleanUp;
+ }
+
+ memmove(v9ses->transport, trans_proto, sizeof(*v9ses->transport));
if ((retval = v9ses->transport->init(v9ses, dev_name, data)) < 0) {
eprintk(KERN_ERR, "problem initializing transport\n");
if ((retval = v9ses->transport->init(v9ses, dev_name, data)) < 0) {
eprintk(KERN_ERR, "problem initializing transport\n");