diff options
author | Manohar Vanga <manohar.vanga@cern.ch> | 2011-02-23 14:25:28 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-23 14:41:29 -0800 |
commit | da1bbd1d85ca4b68c58986f997f859327fd7f648 (patch) | |
tree | d30dad5890b6fc5f57c71fc8b52f5e1e27aa4749 /drivers/staging/vme | |
parent | 6012795b13cd15b1e2216dc8558461ce99aecc30 (diff) | |
download | op-kernel-dev-da1bbd1d85ca4b68c58986f997f859327fd7f648.zip op-kernel-dev-da1bbd1d85ca4b68c58986f997f859327fd7f648.tar.gz |
staging: vme: fix loop condition
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>
Acked-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/vme')
-rw-r--r-- | 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); } |