linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] MXC: mach_armadillo5x0: Add USB Host support.
Date: Thu, 25 Feb 2010 21:58:54 +0000	[thread overview]
Message-ID: <20100225215854.GD24043@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1267090904.2722.8.camel@realization>

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

      parent reply	other threads:[~2010-02-25 21:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-25  9:41 [PATCH v2] MXC: mach_armadillo5x0: Add USB Host support Alberto Panizzo
2010-02-25 10:09 ` Uwe Kleine-König
2010-02-25 10:31   ` Alberto Panizzo
2010-02-25 21:58 ` Russell King - ARM Linux [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100225215854.GD24043@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).