Messages in this thread Patch in this message | | | From | Manohar Vanga <> | Subject | [PATCH 2/2] staging: vme: fix loop condition | Date | Wed, 23 Feb 2011 14:25:28 +0100 |
| |
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> --- 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); } -- 1.7.1
| |