OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e671765
)
usb: usb251xb: fix to avoid potential NULL pointer dereference
author
Aditya Pakki
<pakki001@umn.edu>
Wed, 20 Mar 2019 15:27:11 +0000
(10:27 -0500)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Tue, 26 Mar 2019 07:48:55 +0000
(16:48 +0900)
of_match_device in usb251xb_probe can fail and returns a NULL pointer.
The patch avoids a potential NULL pointer dereference in this scenario.
Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Reviewed-by: Richard Leitner <richard.leitner@skidata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/usb251xb.c
patch
|
blob
|
history
diff --git
a/drivers/usb/misc/usb251xb.c
b/drivers/usb/misc/usb251xb.c
index
2c8e2ca
..
0468484
100644
(file)
--- a/
drivers/usb/misc/usb251xb.c
+++ b/
drivers/usb/misc/usb251xb.c
@@
-612,7
+612,7
@@
static int usb251xb_probe(struct usb251xb *hub)
dev);
int err;
- if (np) {
+ if (np
&& of_id
) {
err = usb251xb_get_ofdata(hub,
(struct usb251xb_data *)of_id->data);
if (err) {