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
b09ac64b
Commit
b09ac64b
authored
Oct 27, 2008
by
David Vrabel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wusb: release mutex in the error path of whci-hcd's whc_do_gencmd()
Signed-off-by:
David Vrabel
<
david.vrabel@csr.com
>
parent
6a4b5870
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
drivers/usb/host/whci/hw.c
drivers/usb/host/whci/hw.c
+5
-3
No files found.
drivers/usb/host/whci/hw.c
View file @
b09ac64b
...
@@ -50,6 +50,7 @@ int whc_do_gencmd(struct whc *whc, u32 cmd, u32 params, void *addr, size_t len)
...
@@ -50,6 +50,7 @@ int whc_do_gencmd(struct whc *whc, u32 cmd, u32 params, void *addr, size_t len)
unsigned
long
flags
;
unsigned
long
flags
;
dma_addr_t
dma_addr
;
dma_addr_t
dma_addr
;
int
t
;
int
t
;
int
ret
=
0
;
mutex_lock
(
&
whc
->
mutex
);
mutex_lock
(
&
whc
->
mutex
);
...
@@ -61,7 +62,8 @@ int whc_do_gencmd(struct whc *whc, u32 cmd, u32 params, void *addr, size_t len)
...
@@ -61,7 +62,8 @@ int whc_do_gencmd(struct whc *whc, u32 cmd, u32 params, void *addr, size_t len)
dev_err
(
&
whc
->
umc
->
dev
,
"generic command timeout (%04x/%04x)
\n
"
,
dev_err
(
&
whc
->
umc
->
dev
,
"generic command timeout (%04x/%04x)
\n
"
,
le_readl
(
whc
->
base
+
WUSBGENCMDSTS
),
le_readl
(
whc
->
base
+
WUSBGENCMDSTS
),
le_readl
(
whc
->
base
+
WUSBGENCMDPARAMS
));
le_readl
(
whc
->
base
+
WUSBGENCMDPARAMS
));
return
-
ETIMEDOUT
;
ret
=
-
ETIMEDOUT
;
goto
out
;
}
}
if
(
addr
)
{
if
(
addr
)
{
...
@@ -80,8 +82,8 @@ int whc_do_gencmd(struct whc *whc, u32 cmd, u32 params, void *addr, size_t len)
...
@@ -80,8 +82,8 @@ int whc_do_gencmd(struct whc *whc, u32 cmd, u32 params, void *addr, size_t len)
whc
->
base
+
WUSBGENCMDSTS
);
whc
->
base
+
WUSBGENCMDSTS
);
spin_unlock_irqrestore
(
&
whc
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
whc
->
lock
,
flags
);
out:
mutex_unlock
(
&
whc
->
mutex
);
mutex_unlock
(
&
whc
->
mutex
);
return
0
;
return
ret
;
}
}
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