OSDN Git Service

USB: host: ohci-at91: fix a crash in ohci_hcd_at91_overcurrent_irq
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Wed, 2 Dec 2015 19:36:55 +0000 (20:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Dec 2015 16:19:55 +0000 (08:19 -0800)
commit4a0c4c36094cefd85cbe489590382ef69516ccef
treea0e208ed3cd7c1c3f6e06765b1bce0c1324637de
parent6406eeb3f5bb376c7d9674e61f8da34ce7f05e8d
USB: host: ohci-at91: fix a crash in ohci_hcd_at91_overcurrent_irq

The interrupt handler, ohci_hcd_at91_overcurrent_irq may be called right
after registration. At that time, pdev->dev.platform_data is not yet set,
leading to a NULL pointer dereference.

Fixes: e4df92279fd9 (USB: host: ohci-at91: merge loops in ohci_hcd_at91_drv_probe)
Reported-by: Peter Rosin <peda@axentia.se>
Tested-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: stable@vger.kernel.org # 4.3+
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ohci-at91.c