projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6286d85
)
usb: gadget: ci13xxx_pci: guard against devices without driver_data
author
Alexander Shishkin
<
[email protected]
>
Fri, 11 May 2012 14:25:40 +0000
(17:25 +0300)
committer
Greg Kroah-Hartman
<
[email protected]
>
Fri, 11 May 2012 23:35:38 +0000
(16:35 -0700)
Don't try to initialize devices that don't have driver_data assigned
to their pci ids.
Reported-by: Greg Kroah-Hartman <
[email protected]
>
Signed-off-by: Alexander Shishkin <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/usb/gadget/ci13xxx_pci.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/ci13xxx_pci.c
b/drivers/usb/gadget/ci13xxx_pci.c
index c76844110e36f857cc321d97a9ffaff20a4c8f2e..f075ef33834f8708b799bdeb93e43586c75139f5 100644
(file)
--- a/
drivers/usb/gadget/ci13xxx_pci.c
+++ b/
drivers/usb/gadget/ci13xxx_pci.c
@@
-51,6
+51,11
@@
static int __devinit ci13xxx_pci_probe(struct pci_dev *pdev,
struct resource res[3];
int retval = 0, nres = 2;
+ if (!driver) {
+ dev_err(&pdev->dev, "device doesn't provide driver data\n");
+ return -ENODEV;
+ }
+
retval = pci_enable_device(pdev);
if (retval)
goto done;