]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9f7fda195a20e37c6b8820fd8e7bb24c883e0765
treea0e208ed3cd7c1c3f6e06765b1bce0c1324637de
parent6e7e6ad1fbe11cf234f5a55f797c6512653cfec4
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: f2f72900e7f4 (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