Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
87da5b32
Commit
87da5b32
authored
Jan 08, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
... and the same for gadgetfs
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
5b5f9560
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
15 deletions
+11
-15
drivers/usb/gadget/inode.c
drivers/usb/gadget/inode.c
+11
-15
No files found.
drivers/usb/gadget/inode.c
View file @
87da5b32
...
...
@@ -2035,7 +2035,6 @@ static int
gadgetfs_fill_super
(
struct
super_block
*
sb
,
void
*
opts
,
int
silent
)
{
struct
inode
*
inode
;
struct
dentry
*
d
;
struct
dev_data
*
dev
;
if
(
the_device
)
...
...
@@ -2058,24 +2057,27 @@ gadgetfs_fill_super (struct super_block *sb, void *opts, int silent)
NULL
,
&
simple_dir_operations
,
S_IFDIR
|
S_IRUGO
|
S_IXUGO
);
if
(
!
inode
)
goto
enomem0
;
goto
Enomem
;
inode
->
i_op
=
&
simple_dir_inode_operations
;
if
(
!
(
d
=
d_alloc_root
(
inode
)))
goto
enomem1
;
sb
->
s_root
=
d
;
if
(
!
(
sb
->
s_root
=
d_alloc_root
(
inode
)))
{
iput
(
inode
);
goto
Enomem
;
}
/* the ep0 file is named after the controller we expect;
* user mode code can use it for sanity checks, like we do.
*/
dev
=
dev_new
();
if
(
!
dev
)
goto
enomem2
;
goto
Enomem
;
dev
->
sb
=
sb
;
if
(
!
gadgetfs_create_file
(
sb
,
CHIP
,
dev
,
&
dev_init_operations
,
&
dev
->
dentry
))
goto
enomem3
;
&
dev
->
dentry
))
{
put_dev
(
dev
);
goto
Enomem
;
}
/* other endpoint files are available after hardware setup,
* from binding to a controller.
...
...
@@ -2083,13 +2085,7 @@ gadgetfs_fill_super (struct super_block *sb, void *opts, int silent)
the_device
=
dev
;
return
0
;
enomem3:
put_dev
(
dev
);
enomem2:
dput
(
d
);
enomem1:
iput
(
inode
);
enomem0:
Enomem:
return
-
ENOMEM
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment