public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] BeagleBoard: match gpio_request() and gpio_free()
Date: Tue, 4 Oct 2011 10:53:03 -0400	[thread overview]
Message-ID: <201110041053.04117.vapier@gentoo.org> (raw)
In-Reply-To: <1317715159-11367-1-git-send-email-kukyakya@gmail.com>

On Tuesday, October 04, 2011 03:59:19 In-Bae Jeong wrote:
> -	if (!gpio_request(171, "") &&
> -	    !gpio_request(172, "") &&
> -	    !gpio_request(173, "")) {
> +	if (gpio_request(171, "")) {
> +		error = 171;
> +		goto GPIO_171_ERR;
> +	}
> +	if (gpio_request(172, "")) {
> +		error = 172;
> +		goto GPIO_172_ERR;
> +	}
> +	if (gpio_request(173, "")) {
> +		error = 173;
> +		goto GPIO_173_ERR;
> +	}

why isn't this code passing a proper label to gpio_request() ?

> +GPIO_NO_ERR:  gpio_free(173);
> +GPIO_173_ERR: gpio_free(172);
> +GPIO_172_ERR: gpio_free(171);
> +GPIO_171_ERR:

labels and statements should not be on the same line

also, lose the caps
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111004/63e17ef0/attachment.pgp 

  reply	other threads:[~2011-10-04 14:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-04  7:59 [U-Boot] [PATCH] BeagleBoard: match gpio_request() and gpio_free() In-Bae Jeong
2011-10-04 14:53 ` Mike Frysinger [this message]
2011-10-05 12:08 ` [U-Boot] [PATCH v2] " In-Bae Jeong
2011-10-21 19:14   ` Albert ARIBAUD
2011-11-08 21:53     ` Albert ARIBAUD

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=201110041053.04117.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=u-boot@lists.denx.de \
    /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