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>
This commit is contained in:
parent
6012795b13
commit
da1bbd1d85
|
@ -1364,7 +1364,7 @@ int vme_register_bridge(struct vme_bridge *bridge)
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
err_reg:
|
err_reg:
|
||||||
while (i > -1) {
|
while (--i >= 0) {
|
||||||
dev = &bridge->dev[i];
|
dev = &bridge->dev[i];
|
||||||
device_unregister(dev);
|
device_unregister(dev);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue