From: Martyn Welch <martyn.welch@ge.com>
To: Manohar Vanga <manohar.vanga@cern.ch>
Cc: gregkh@suse.de, cota@braap.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] staging: vme: fix bug in vme_register_bridge
Date: Wed, 23 Feb 2011 09:44:42 +0000 [thread overview]
Message-ID: <4D64D70A.1060007@ge.com> (raw)
In-Reply-To: <1298453209-30821-1-git-send-email-manohar.vanga@cern.ch>
On 23/02/11 09:26, Manohar Vanga wrote:
> Fix a bug in vme_register_bridge that results in an infinite loop in
> the event that device_register fails.
>
Good catch!
Acked-by: Martyn Welch <martyn.welch@ge.com>
> Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
> ---
> drivers/staging/vme/vme.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c
> index 88bf455..e77d6a8 100644
> --- a/drivers/staging/vme/vme.c
> +++ b/drivers/staging/vme/vme.c
> @@ -1364,9 +1364,14 @@ int vme_register_bridge(struct vme_bridge *bridge)
> return retval;
>
> err_reg:
> + /*
> + * Ignore the failed device and unregister the rest.
> + */
> + i--;
> while (i > -1) {
> dev = &bridge->dev[i];
> device_unregister(dev);
> + i--;
> }
> vme_free_bus_num(bridge->num);
> return retval;
--
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
next parent reply other threads:[~2011-02-23 9:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1298453209-30821-1-git-send-email-manohar.vanga@cern.ch>
2011-02-23 9:44 ` Martyn Welch [this message]
2011-02-23 12:24 ` [PATCH 2/2] staging: vme: fix bug in vme_register_bridge Dan Carpenter
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=4D64D70A.1060007@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 \
/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