mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-13 16:50:05 +00:00
usb: gadget: amd5536udc: avoid NULL pointer dereference in udc_pci_probe()
dev->pdev is NULL before `dev->pdev = pdev'; use pdev instead. Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
deeeb9ee1e
commit
25e14c1fcc
@ -3231,7 +3231,7 @@ static int udc_pci_probe(
|
||||
}
|
||||
|
||||
if (!pdev->irq) {
|
||||
dev_err(&dev->pdev->dev, "irq not set\n");
|
||||
dev_err(&pdev->dev, "irq not set\n");
|
||||
kfree(dev);
|
||||
dev = NULL;
|
||||
retval = -ENODEV;
|
||||
@ -3250,7 +3250,7 @@ static int udc_pci_probe(
|
||||
dev->txfifo = (u32 __iomem *)(dev->virt_addr + UDC_TXFIFO_ADDR);
|
||||
|
||||
if (request_irq(pdev->irq, udc_irq, IRQF_SHARED, name, dev) != 0) {
|
||||
dev_dbg(&dev->pdev->dev, "request_irq(%d) fail\n", pdev->irq);
|
||||
dev_dbg(&pdev->dev, "request_irq(%d) fail\n", pdev->irq);
|
||||
kfree(dev);
|
||||
dev = NULL;
|
||||
retval = -EBUSY;
|
||||
|
Loading…
x
Reference in New Issue
Block a user