Skip to content

Commit

Permalink
[arbel] Fix off-by-one error in the failure path in arbel_probe()
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Brown committed Oct 1, 2008
1 parent 76f6cad commit df02c54
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/drivers/infiniband/arbel.c
Expand Up @@ -2183,9 +2183,9 @@ static int arbel_probe ( struct pci_device *pci,

return 0;

i = ( ARBEL_NUM_PORTS - 1 );
i = ARBEL_NUM_PORTS;
err_register_ibdev:
for ( ; i >= 0 ; i-- )
for ( i-- ; i >= 0 ; i-- )
unregister_ibdev ( arbel->ibdev[i] );
arbel_destroy_eq ( arbel );
err_create_eq:
Expand All @@ -2201,9 +2201,9 @@ static int arbel_probe ( struct pci_device *pci,
err_mailbox_out:
free_dma ( arbel->mailbox_in, ARBEL_MBOX_SIZE );
err_mailbox_in:
i = ( ARBEL_NUM_PORTS - 1 );
i = ARBEL_NUM_PORTS;
err_alloc_ibdev:
for ( ; i >= 0 ; i-- )
for ( i-- ; i >= 0 ; i-- )
ibdev_put ( arbel->ibdev[i] );
free ( arbel );
err_alloc_arbel:
Expand Down

0 comments on commit df02c54

Please sign in to comment.