diff options
Diffstat (limited to 'drivers/usb/host/ohci-at91.c')
| -rw-r--r-- | drivers/usb/host/ohci-at91.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index aaa8d2bce217..0bf72f943b00 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c | |||
| @@ -467,7 +467,8 @@ static irqreturn_t ohci_hcd_at91_overcurrent_irq(int irq, void *data) | |||
| 467 | /* From the GPIO notifying the over-current situation, find | 467 | /* From the GPIO notifying the over-current situation, find |
| 468 | * out the corresponding port */ | 468 | * out the corresponding port */ |
| 469 | at91_for_each_port(port) { | 469 | at91_for_each_port(port) { |
| 470 | if (gpio_to_irq(pdata->overcurrent_pin[port]) == irq) { | 470 | if (gpio_is_valid(pdata->overcurrent_pin[port]) && |
| 471 | gpio_to_irq(pdata->overcurrent_pin[port]) == irq) { | ||
| 471 | gpio = pdata->overcurrent_pin[port]; | 472 | gpio = pdata->overcurrent_pin[port]; |
| 472 | break; | 473 | break; |
| 473 | } | 474 | } |
