Date: Fri, 22 Jul 2016 03:19:50 +0000 (UTC) From: Sean Bruno <sbruno@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303175 - stable/10/sys/dev/e1000 Message-ID: <201607220319.u6M3Jo13078665@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sbruno Date: Fri Jul 22 03:19:49 2016 New Revision: 303175 URL: https://svnweb.freebsd.org/changeset/base/303175 Log: 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 Modified: stable/10/sys/dev/e1000/if_igb.c Modified: stable/10/sys/dev/e1000/if_igb.c ============================================================================== --- stable/10/sys/dev/e1000/if_igb.c Fri Jul 22 03:16:37 2016 (r303174) +++ stable/10/sys/dev/e1000/if_igb.c Fri Jul 22 03:19:49 2016 (r303175) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607220319.u6M3Jo13078665>