diff options
author | sbruno <sbruno@FreeBSD.org> | 2016-07-22 03:19:49 +0000 |
---|---|---|
committer | sbruno <sbruno@FreeBSD.org> | 2016-07-22 03:19:49 +0000 |
commit | f0a9d850622135a0755732fa6f3304a92c0cfc37 (patch) | |
tree | 76361007df3a37977e8346b008c20a336456bd40 | |
parent | d6d8480d0aad9a5badb4491b576d2343992ec9f8 (diff) | |
download | FreeBSD-src-f0a9d850622135a0755732fa6f3304a92c0cfc37.zip FreeBSD-src-f0a9d850622135a0755732fa6f3304a92c0cfc37.tar.gz |
MFC r299188
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
-rw-r--r-- | sys/dev/e1000/if_igb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/e1000/if_igb.c b/sys/dev/e1000/if_igb.c index 7531d4e..8b70622 100644 --- a/sys/dev/e1000/if_igb.c +++ b/sys/dev/e1000/if_igb.c @@ -664,7 +664,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); |