From owner-svn-src-head@freebsd.org Wed Apr 13 09:20:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19E46B0EE16; Wed, 13 Apr 2016 09:20:31 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC81A1DC7; Wed, 13 Apr 2016 09:20:30 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3D9KUcY071997; Wed, 13 Apr 2016 09:20:30 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3D9KTVv071995; Wed, 13 Apr 2016 09:20:29 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201604130920.u3D9KTVv071995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 13 Apr 2016 09:20:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297913 - in head/sys/dev/hyperv: netvsc storvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2016 09:20:31 -0000 Author: sephe Date: Wed Apr 13 09:20:29 2016 New Revision: 297913 URL: https://svnweb.freebsd.org/changeset/base/297913 Log: hyperv: device_get_softc does not return NULL MFC after: 1 week Sponsored by: Microsoft OSTC Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Apr 13 07:04:04 2016 (r297912) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Wed Apr 13 09:20:29 2016 (r297913) @@ -418,9 +418,6 @@ netvsc_attach(device_t dev) #endif sc = device_get_softc(dev); - if (sc == NULL) { - return (ENOMEM); - } bzero(sc, sizeof(hn_softc_t)); sc->hn_unit = unit; @@ -1169,10 +1166,6 @@ netvsc_linkstatus_callback(struct hv_dev { hn_softc_t *sc = device_get_softc(device_obj->device); - if (sc == NULL) { - return; - } - if (status == 1) { sc->hn_carrier = 1; } else { Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Wed Apr 13 07:04:04 2016 (r297912) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Wed Apr 13 09:20:29 2016 (r297913) @@ -293,9 +293,6 @@ get_stor_device(struct hv_device *device struct storvsc_softc *sc; sc = device_get_softc(device->device); - if (sc == NULL) { - return NULL; - } if (outbound) { /* @@ -976,10 +973,6 @@ storvsc_attach(device_t dev) root_mount_token = root_mount_hold("storvsc"); sc = device_get_softc(dev); - if (sc == NULL) { - ret = ENOMEM; - goto cleanup; - } stor_type = storvsc_get_storage_type(dev);