[PATCH v2] MXC: mach_armadillo5x0: Add USB Host support.
Russell King - ARM Linux
linux at arm.linux.org.uk
Thu Feb 25 16:58:54 EST 2010
On Thu, Feb 25, 2010 at 10:41:44AM +0100, Alberto Panizzo wrote:
> + if (gpio_direction_output(OTG_RESET, 1/*HIGH*/)) {
> + pr_warning("Failed to reset usbotg phy \n");
> + return -1;
Always propagate error codes. Don't invent your own - especially when
they mean "permission denied".
> + if (gpio_direction_output(USBH2_RESET, 1/*HIGH*/)) {
> + pr_warning("Failed to reset usbh2 phy \n");
> + return -1;
Ditto.
Never use -1 as an error code - always use a proper error code from errno*.h
More information about the linux-arm-kernel
mailing list