From owner-svn-src-all@FreeBSD.ORG Wed May 13 14:43:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18375106566B; Wed, 13 May 2009 14:43:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06C678FC12; Wed, 13 May 2009 14:43:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4DEhQXx059185; Wed, 13 May 2009 14:43:26 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4DEhQQn059183; Wed, 13 May 2009 14:43:26 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200905131443.n4DEhQQn059183@svn.freebsd.org> From: Warner Losh Date: Wed, 13 May 2009 14:43:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192043 - head/sys/dev/ed X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2009 14:43:27 -0000 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: /*