mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Since igb_detach() cleans up all the data structures that will be
free'd by the functions following its call, we can simply return instead of crashing and burning in the event of igb_detach() failing. PR: 197139 Submitted by: rupavath@juniper.net MFC after: 2 weeks
This commit is contained in:
parent
bc5ade0d10
commit
40b6008fc5
1 changed files with 2 additions and 1 deletions
|
|
@ -659,7 +659,8 @@ igb_attach(device_t dev)
|
|||
return (0);
|
||||
|
||||
err_late:
|
||||
igb_detach(dev);
|
||||
if (igb_detach(dev) == 0) /* igb_detach() already did the cleanup */
|
||||
return(error);
|
||||
igb_free_transmit_structures(adapter);
|
||||
igb_free_receive_structures(adapter);
|
||||
igb_release_hw_control(adapter);
|
||||
|
|
|
|||
Loading…
Reference in a new issue