mirror of https://github.com/ipxe/ipxe.git
[hermon] Fix off-by-one error in the failure path in hermon_probe()
parent
e899f100ca
commit
76f6cad8af
|
@ -2252,9 +2252,9 @@ static int hermon_probe ( struct pci_device *pci,
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
i = ( HERMON_NUM_PORTS - 1 );
|
i = HERMON_NUM_PORTS;
|
||||||
err_register_ibdev:
|
err_register_ibdev:
|
||||||
for ( ; i >= 0 ; i-- )
|
for ( i-- ; i >= 0 ; i-- )
|
||||||
unregister_ibdev ( hermon->ibdev[i] );
|
unregister_ibdev ( hermon->ibdev[i] );
|
||||||
hermon_destroy_eq ( hermon );
|
hermon_destroy_eq ( hermon );
|
||||||
err_create_eq:
|
err_create_eq:
|
||||||
|
@ -2270,9 +2270,9 @@ static int hermon_probe ( struct pci_device *pci,
|
||||||
err_mailbox_out:
|
err_mailbox_out:
|
||||||
free_dma ( hermon->mailbox_in, HERMON_MBOX_SIZE );
|
free_dma ( hermon->mailbox_in, HERMON_MBOX_SIZE );
|
||||||
err_mailbox_in:
|
err_mailbox_in:
|
||||||
i = ( HERMON_NUM_PORTS - 1 );
|
i = HERMON_NUM_PORTS;
|
||||||
err_alloc_ibdev:
|
err_alloc_ibdev:
|
||||||
for ( ; i >= 0 ; i-- )
|
for ( i-- ; i >= 0 ; i-- )
|
||||||
ibdev_put ( hermon->ibdev[i] );
|
ibdev_put ( hermon->ibdev[i] );
|
||||||
free ( hermon );
|
free ( hermon );
|
||||||
err_alloc_hermon:
|
err_alloc_hermon:
|
||||||
|
|
Loading…
Reference in New Issue