* Re: [PATCH 2/2] staging: vme: fix bug in vme_register_bridge
[not found] <1298453209-30821-1-git-send-email-manohar.vanga@cern.ch>
@ 2011-02-23 9:44 ` Martyn Welch
2011-02-23 12:24 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Martyn Welch @ 2011-02-23 9:44 UTC (permalink / raw)
To: Manohar Vanga; +Cc: gregkh, cota, devel, linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] staging: vme: fix bug in vme_register_bridge
2011-02-23 9:44 ` [PATCH 2/2] staging: vme: fix bug in vme_register_bridge Martyn Welch
@ 2011-02-23 12:24 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2011-02-23 12:24 UTC (permalink / raw)
To: Martyn Welch; +Cc: Manohar Vanga, devel, gregkh, cota, linux-kernel
On Wed, Feb 23, 2011 at 09:44:42AM +0000, Martyn Welch wrote:
> 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.
[snip]
> > + /*
> > + * Ignore the failed device and unregister the rest.
> > + */
> > + i--;
> > while (i > -1) {
> > dev = &bridge->dev[i];
> > device_unregister(dev);
> > + i--;
> > }
Ah. I see you fixed the bug already. Good deal. Btw, no need to add
comments for the obvious stuff.
You still aren't CCing the right list, devel@driverdev.osuosl.org.
It's not enough for Martyn to sent it to us, because by that point
the patch has '> ' chars on every line.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-23 12:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1298453209-30821-1-git-send-email-manohar.vanga@cern.ch>
2011-02-23 9:44 ` [PATCH 2/2] staging: vme: fix bug in vme_register_bridge Martyn Welch
2011-02-23 12:24 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox