Thread (4 messages) 4 messages, 3 authors, 2010-02-25
DORMANTno replies

[PATCH v2] MXC: mach_armadillo5x0: Add USB Host support.

From: Russell King - ARM Linux <hidden>
Date: 2010-02-25 21:58:54

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help