aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/e1000
diff options
context:
space:
mode:
authorSean Bruno <sbruno@FreeBSD.org>2016-05-06 17:00:45 +0000
committerSean Bruno <sbruno@FreeBSD.org>2016-05-06 17:00:45 +0000
commit40b6008fc574ff95f0a37e89dd4f6208dc2f8234 (patch)
tree252eed6e7321e2e36d720c4e1f201eed8b001ecf /sys/dev/e1000
parentbc5ade0d1069d1c1fdfe74edd210bb58228fd52b (diff)
downloadsrc-40b6008fc574ff95f0a37e89dd4f6208dc2f8234.tar.gz
src-40b6008fc574ff95f0a37e89dd4f6208dc2f8234.zip
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
Notes
Notes: svn path=/head/; revision=299188
Diffstat (limited to 'sys/dev/e1000')
-rw-r--r--sys/dev/e1000/if_igb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/e1000/if_igb.c b/sys/dev/e1000/if_igb.c
index 965370d7a14a..34f1d8968a0e 100644
--- a/sys/dev/e1000/if_igb.c
+++ b/sys/dev/e1000/if_igb.c
@@ -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);