Skip to content

Commit

Permalink
USB: atmel_usba_udc: force vbus_pin at -EINVAL when gpio_request failled
Browse files Browse the repository at this point in the history
to ensure gpio_is_valid return false

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jean-Christophe PLAGNIOL-VILLARD authored and Greg Kroah-Hartman committed Oct 22, 2010
1 parent e5dcd53 commit 969afff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/usb/gadget/atmel_usba_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2015,6 +2015,9 @@ static int __init usba_udc_probe(struct platform_device *pdev)
} else {
disable_irq(gpio_to_irq(udc->vbus_pin));
}
} else {
/* gpio_request fail so use -EINVAL for gpio_is_valid */
ubc->vbus_pin = -EINVAL;
}
}

Expand Down

0 comments on commit 969afff

Please sign in to comment.