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
Kirill Smelkov
linux
Commits
6b6f1ba5
Commit
6b6f1ba5
authored
Jun 21, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB: sparse fixups for devio.c
parent
5b974f1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
drivers/usb/core/devio.c
drivers/usb/core/devio.c
+10
-9
No files found.
drivers/usb/core/devio.c
View file @
6b6f1ba5
...
@@ -290,8 +290,11 @@ static void destroy_async (struct dev_state *ps, struct list_head *list)
...
@@ -290,8 +290,11 @@ static void destroy_async (struct dev_state *ps, struct list_head *list)
spin_lock_irqsave
(
&
ps
->
lock
,
flags
);
spin_lock_irqsave
(
&
ps
->
lock
,
flags
);
}
}
spin_unlock_irqrestore
(
&
ps
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
ps
->
lock
,
flags
);
while
((
as
=
async_getcompleted
(
ps
)))
as
=
async_getcompleted
(
ps
);
while
(
as
)
{
free_async
(
as
);
free_async
(
as
);
as
=
async_getcompleted
(
ps
);
}
}
}
static
void
destroy_async_on_interface
(
struct
dev_state
*
ps
,
unsigned
int
ifnum
)
static
void
destroy_async_on_interface
(
struct
dev_state
*
ps
,
unsigned
int
ifnum
)
...
@@ -968,29 +971,27 @@ static int proc_unlinkurb(struct dev_state *ps, void __user *arg)
...
@@ -968,29 +971,27 @@ static int proc_unlinkurb(struct dev_state *ps, void __user *arg)
static
int
processcompl
(
struct
async
*
as
)
static
int
processcompl
(
struct
async
*
as
)
{
{
struct
urb
*
urb
=
as
->
urb
;
struct
urb
*
urb
=
as
->
urb
;
struct
usbdevfs_urb
__user
*
userurb
=
as
->
userurb
;
unsigned
int
i
;
unsigned
int
i
;
if
(
as
->
userbuffer
)
if
(
as
->
userbuffer
)
if
(
copy_to_user
(
as
->
userbuffer
,
urb
->
transfer_buffer
,
urb
->
transfer_buffer_length
))
if
(
copy_to_user
(
as
->
userbuffer
,
urb
->
transfer_buffer
,
urb
->
transfer_buffer_length
))
return
-
EFAULT
;
return
-
EFAULT
;
if
(
put_user
(
urb
->
status
,
if
(
put_user
(
urb
->
status
,
&
userurb
->
status
))
&
((
struct
usbdevfs_urb
*
)
as
->
userurb
)
->
status
))
return
-
EFAULT
;
return
-
EFAULT
;
if
(
put_user
(
urb
->
actual_length
,
if
(
put_user
(
urb
->
actual_length
,
&
userurb
->
actual_length
))
&
((
struct
usbdevfs_urb
*
)
as
->
userurb
)
->
actual_length
))
return
-
EFAULT
;
return
-
EFAULT
;
if
(
put_user
(
urb
->
error_count
,
if
(
put_user
(
urb
->
error_count
,
&
userurb
->
error_count
))
&
((
struct
usbdevfs_urb
*
)
as
->
userurb
)
->
error_count
))
return
-
EFAULT
;
return
-
EFAULT
;
if
(
!
(
usb_pipeisoc
(
urb
->
pipe
)))
if
(
!
(
usb_pipeisoc
(
urb
->
pipe
)))
return
0
;
return
0
;
for
(
i
=
0
;
i
<
urb
->
number_of_packets
;
i
++
)
{
for
(
i
=
0
;
i
<
urb
->
number_of_packets
;
i
++
)
{
if
(
put_user
(
urb
->
iso_frame_desc
[
i
].
actual_length
,
if
(
put_user
(
urb
->
iso_frame_desc
[
i
].
actual_length
,
&
((
struct
usbdevfs_urb
*
)
as
->
userurb
)
->
iso_frame_desc
[
i
].
actual_length
))
&
userurb
->
iso_frame_desc
[
i
].
actual_length
))
return
-
EFAULT
;
return
-
EFAULT
;
if
(
put_user
(
urb
->
iso_frame_desc
[
i
].
status
,
if
(
put_user
(
urb
->
iso_frame_desc
[
i
].
status
,
&
((
struct
usbdevfs_urb
*
)
as
->
userurb
)
->
iso_frame_desc
[
i
].
status
))
&
userurb
->
iso_frame_desc
[
i
].
status
))
return
-
EFAULT
;
return
-
EFAULT
;
}
}
return
0
;
return
0
;
...
...
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