Skip to content

Commit

Permalink
USB: gadget: ci13xx_pci: remove unneeded check in ci13xxx_pci_probe()
Browse files Browse the repository at this point in the history
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 62bb84e: "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>
  • Loading branch information
Greg Kroah-Hartman committed May 10, 2012
1 parent f639554 commit 56d95f3
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/usb/gadget/ci13xxx_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 56d95f3

Please sign in to comment.