Skip to content

Commit

Permalink
staging: vme: fix loop condition
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Manohar Vanga authored and Greg Kroah-Hartman committed Feb 23, 2011
1 parent 6012795 commit da1bbd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/vme/vme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit da1bbd1

Please sign in to comment.