summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-10 22:41:49 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-10 22:41:49 +0400
commit56d95f3174450d22a3b8d936bea2cb414262ce8f (patch)
treec17942cfdf5adb196e9e080564a7e238ac5de226
parentf639554b8a3a4aac18193a0c98a4639d432c48f0 (diff)
downloadlinux-56d95f3174450d22a3b8d936bea2cb414262ce8f.tar.xz
USB: gadget: ci13xx_pci: remove unneeded check in ci13xxx_pci_probe()
As pointed out by Dan Carpenter, the check for NULL for the id variable is no longer needed, especially as we just dereferenced it a few lines earlier, causing an oops if it really was NULL. This was caused by 62bb84ed0e4d: "usb: gadget: ci13xxx: convert to platform device". Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/gadget/ci13xxx_pci.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/usb/gadget/ci13xxx_pci.c b/drivers/usb/gadget/ci13xxx_pci.c
index ea03fabd4d97..c76844110e36 100644
--- a/drivers/usb/gadget/ci13xxx_pci.c
+++ b/drivers/usb/gadget/ci13xxx_pci.c
@@ -51,9 +51,6 @@ static int __devinit ci13xxx_pci_probe(struct pci_dev *pdev,
struct resource res[3];
int retval = 0, nres = 2;
- if (id == NULL)
- return -EINVAL;
-
retval = pci_enable_device(pdev);
if (retval)
goto done;