Date: Mon, 25 Apr 2011 04:55:51 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r221005 - head/sys/dev/msk Message-ID: <201104250455.p3P4tp4f061348@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Mon Apr 25 04:55:50 2011 New Revision: 221005 URL: http://svn.freebsd.org/changeset/base/221005 Log: When msk_detach() is called from msk_attach(), ifp may be yet not initialized. Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Mon Apr 25 04:33:42 2011 (r221004) +++ head/sys/dev/msk/if_msk.c Mon Apr 25 04:55:50 2011 (r221005) @@ -1964,7 +1964,8 @@ msk_detach(device_t dev) /* Can't hold locks while calling detach. */ MSK_IF_UNLOCK(sc_if); callout_drain(&sc_if->msk_tick_ch); - ether_ifdetach(ifp); + if (ifp) + ether_ifdetach(ifp); MSK_IF_LOCK(sc_if); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104250455.p3P4tp4f061348>