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
b447780d
Commit
b447780d
authored
Oct 20, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
USB: remove unneeded checks in the usb-serial core.
Signed-off-by:
Greg Kroah-Hartman
<
greg@kroah.com
>
parent
cee6102d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
24 deletions
+12
-24
drivers/usb/serial/usb-serial.c
drivers/usb/serial/usb-serial.c
+12
-24
No files found.
drivers/usb/serial/usb-serial.c
View file @
b447780d
...
@@ -452,18 +452,12 @@ static void destroy_serial(struct kref *kref)
...
@@ -452,18 +452,12 @@ static void destroy_serial(struct kref *kref)
port
=
serial
->
port
[
i
];
port
=
serial
->
port
[
i
];
if
(
!
port
)
if
(
!
port
)
continue
;
continue
;
if
(
port
->
read_urb
)
{
usb_kill_urb
(
port
->
read_urb
);
usb_kill_urb
(
port
->
read_urb
);
usb_free_urb
(
port
->
read_urb
);
usb_free_urb
(
port
->
read_urb
);
}
if
(
port
->
write_urb
)
{
usb_kill_urb
(
port
->
write_urb
);
usb_kill_urb
(
port
->
write_urb
);
usb_free_urb
(
port
->
write_urb
);
usb_free_urb
(
port
->
write_urb
);
}
if
(
port
->
interrupt_in_urb
)
{
usb_kill_urb
(
port
->
interrupt_in_urb
);
usb_kill_urb
(
port
->
interrupt_in_urb
);
usb_free_urb
(
port
->
interrupt_in_urb
);
usb_free_urb
(
port
->
interrupt_in_urb
);
}
kfree
(
port
->
bulk_in_buffer
);
kfree
(
port
->
bulk_in_buffer
);
kfree
(
port
->
bulk_out_buffer
);
kfree
(
port
->
bulk_out_buffer
);
kfree
(
port
->
interrupt_in_buffer
);
kfree
(
port
->
interrupt_in_buffer
);
...
@@ -799,18 +793,12 @@ static void port_release(struct device *dev)
...
@@ -799,18 +793,12 @@ static void port_release(struct device *dev)
struct
usb_serial_port
*
port
=
to_usb_serial_port
(
dev
);
struct
usb_serial_port
*
port
=
to_usb_serial_port
(
dev
);
dbg
(
"%s - %s"
,
__FUNCTION__
,
dev
->
bus_id
);
dbg
(
"%s - %s"
,
__FUNCTION__
,
dev
->
bus_id
);
if
(
port
->
read_urb
)
{
usb_kill_urb
(
port
->
read_urb
);
usb_kill_urb
(
port
->
read_urb
);
usb_free_urb
(
port
->
read_urb
);
usb_free_urb
(
port
->
read_urb
);
}
if
(
port
->
write_urb
)
{
usb_kill_urb
(
port
->
write_urb
);
usb_kill_urb
(
port
->
write_urb
);
usb_free_urb
(
port
->
write_urb
);
usb_free_urb
(
port
->
write_urb
);
}
if
(
port
->
interrupt_in_urb
)
{
usb_kill_urb
(
port
->
interrupt_in_urb
);
usb_kill_urb
(
port
->
interrupt_in_urb
);
usb_free_urb
(
port
->
interrupt_in_urb
);
usb_free_urb
(
port
->
interrupt_in_urb
);
}
kfree
(
port
->
bulk_in_buffer
);
kfree
(
port
->
bulk_in_buffer
);
kfree
(
port
->
bulk_out_buffer
);
kfree
(
port
->
bulk_out_buffer
);
kfree
(
port
->
interrupt_in_buffer
);
kfree
(
port
->
interrupt_in_buffer
);
...
...
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