Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 May 2009 14:43:26 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r192043 - head/sys/dev/ed
Message-ID:  <200905131443.n4DEhQQn059183@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Wed May 13 14:43:26 2009
New Revision: 192043
URL: http://svn.freebsd.org/changeset/base/192043

Log:
  ifp->if_softc is managed entirely by the driver.  We never set it to
  NULL or change it.  We initialize it before we set if_ioctl.  It can
  therefore never be NULL, and most other drivers don't bother with this
  sanity check.

Modified:
  head/sys/dev/ed/if_ed.c

Modified: head/sys/dev/ed/if_ed.c
==============================================================================
--- head/sys/dev/ed/if_ed.c	Wed May 13 14:25:55 2009	(r192042)
+++ head/sys/dev/ed/if_ed.c	Wed May 13 14:43:26 2009	(r192043)
@@ -1164,14 +1164,6 @@ ed_ioctl(struct ifnet *ifp, u_long comma
 	struct ifreq *ifr = (struct ifreq *)data;
 	int     error = 0;
 
-	/*
-	 * XXX really needed?
-	 */
-	if (sc == NULL) {
-		ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
-		return (ENXIO);
-	}
-
 	switch (command) {
 	case SIOCSIFFLAGS:
 		/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905131443.n4DEhQQn059183>