summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>2012-05-11 14:25:40 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-11 23:35:38 (GMT)
commit1989b5ceb5aa57862ed770368ae90bf44fd13198 (patch)
tree80eeb42239d9d5520d2df7346adc8777e156732e /drivers
parent6286d85e8efdb59252d1ceb99a56fa6b0b11526c (diff)
downloadlinux-1989b5ceb5aa57862ed770368ae90bf44fd13198.tar.xz
usb: gadget: ci13xxx_pci: guard against devices without driver_data
Don't try to initialize devices that don't have driver_data assigned to their pci ids. Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/ci13xxx_pci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/gadget/ci13xxx_pci.c b/drivers/usb/gadget/ci13xxx_pci.c
index c768441..f075ef3 100644
--- 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;