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
cb8d6809
Commit
cb8d6809
authored
Apr 04, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB: remove redundant checks for NULL when it can never happen.
parent
f20c266a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
16 deletions
+0
-16
drivers/usb/core/usb.c
drivers/usb/core/usb.c
+0
-16
No files found.
drivers/usb/core/usb.c
View file @
cb8d6809
...
@@ -110,12 +110,6 @@ int usb_device_remove(struct device *dev)
...
@@ -110,12 +110,6 @@ int usb_device_remove(struct device *dev)
intf
=
list_entry
(
dev
,
struct
usb_interface
,
dev
);
intf
=
list_entry
(
dev
,
struct
usb_interface
,
dev
);
driver
=
to_usb_driver
(
dev
->
driver
);
driver
=
to_usb_driver
(
dev
->
driver
);
if
(
!
driver
)
{
dev_err
(
dev
,
"%s does not have a valid driver to work with!"
,
__FUNCTION__
);
return
-
ENODEV
;
}
down
(
&
driver
->
serialize
);
down
(
&
driver
->
serialize
);
if
(
intf
->
driver
&&
intf
->
driver
->
disconnect
)
if
(
intf
->
driver
&&
intf
->
driver
->
disconnect
)
...
@@ -480,9 +474,6 @@ struct usb_interface *usb_find_interface(struct usb_driver *drv, kdev_t kdev)
...
@@ -480,9 +474,6 @@ struct usb_interface *usb_find_interface(struct usb_driver *drv, kdev_t kdev)
continue
;
continue
;
intf
=
to_usb_interface
(
dev
);
intf
=
to_usb_interface
(
dev
);
if
(
!
intf
)
continue
;
if
(
kdev_same
(
intf
->
kdev
,
kdev
))
{
if
(
kdev_same
(
intf
->
kdev
,
kdev
))
{
return
intf
;
return
intf
;
}
}
...
@@ -548,12 +539,7 @@ static int usb_hotplug (struct device *dev, char **envp, int num_envp,
...
@@ -548,12 +539,7 @@ static int usb_hotplug (struct device *dev, char **envp, int num_envp,
return
0
;
return
0
;
intf
=
to_usb_interface
(
dev
);
intf
=
to_usb_interface
(
dev
);
if
(
!
intf
)
return
-
ENODEV
;
usb_dev
=
interface_to_usbdev
(
intf
);
usb_dev
=
interface_to_usbdev
(
intf
);
if
(
!
usb_dev
)
return
-
ENODEV
;
if
(
usb_dev
->
devnum
<
0
)
{
if
(
usb_dev
->
devnum
<
0
)
{
dbg
(
"device already deleted ??"
);
dbg
(
"device already deleted ??"
);
...
@@ -730,8 +716,6 @@ static void usb_release_dev(struct device *dev)
...
@@ -730,8 +716,6 @@ static void usb_release_dev(struct device *dev)
struct
usb_device
*
udev
;
struct
usb_device
*
udev
;
udev
=
to_usb_device
(
dev
);
udev
=
to_usb_device
(
dev
);
if
(
!
udev
)
return
;
if
(
udev
->
bus
&&
udev
->
bus
->
op
&&
udev
->
bus
->
op
->
deallocate
)
if
(
udev
->
bus
&&
udev
->
bus
->
op
&&
udev
->
bus
->
op
->
deallocate
)
udev
->
bus
->
op
->
deallocate
(
udev
);
udev
->
bus
->
op
->
deallocate
(
udev
);
...
...
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