public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Martyn Welch <martyn.welch@ge.com>
To: Manohar Vanga <manohar.vanga@cern.ch>
Cc: gregkh@suse.de, wfp5p@virginia.edu, cota@braap.org,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] staging: vme: fix loop condition
Date: Wed, 23 Feb 2011 17:01:03 +0000	[thread overview]
Message-ID: <4D653D4F.8080507@ge.com> (raw)
In-Reply-To: <1298467528-26472-3-git-send-email-manohar.vanga@cern.ch>

On 23/02/11 13:25, Manohar Vanga wrote:
> Fix loop condition in vme_register_bridge that results in an infinite
> loop in the event that device_register fails.
> 
> Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>

Acked-by: Martyn Welch <martyn.welch@ge.com>

> ---
>  drivers/staging/vme/vme.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c
> index 88bf455..c1ec230 100644
> --- a/drivers/staging/vme/vme.c
> +++ b/drivers/staging/vme/vme.c
> @@ -1364,7 +1364,7 @@ int vme_register_bridge(struct vme_bridge *bridge)
>  	return retval;
>  
>  err_reg:
> -	while (i > -1) {
> +	while (--i >= 0) {
>  		dev = &bridge->dev[i];
>  		device_unregister(dev);
>  	}


-- 
Martyn Welch (Principal Software Engineer) | Registered in England and
GE Intelligent Platforms                   | Wales (3828642) at 100
T +44(0)127322748                          | Barbirolli Square, Manchester,
E martyn.welch@ge.com                      | M2 3AB  VAT:GB 927559189

      parent reply	other threads:[~2011-02-23 17:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-23 13:25 [PATCH 0/2] staging: vme: fix issues in vme_register_bridge Manohar Vanga
2011-02-23 13:25 ` [PATCH 1/2] staging: vme: remove unreachable code Manohar Vanga
2011-02-23 13:56   ` Dan Carpenter
2011-02-23 17:00   ` Martyn Welch
2011-02-23 13:25 ` [PATCH 2/2] staging: vme: fix loop condition Manohar Vanga
2011-02-23 13:57   ` Dan Carpenter
2011-02-23 17:01   ` Martyn Welch [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=4D653D4F.8080507@ge.com \
    --to=martyn.welch@ge.com \
    --cc=cota@braap.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manohar.vanga@cern.ch \
    --cc=wfp5p@virginia.edu \
    /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