Date: Thu, 11 Feb 2016 11:57:12 +0000 (UTC) From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= <royger@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295513 - head/sys/dev/xen/netfront Message-ID: <201602111157.u1BBvCAN050191@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: royger Date: Thu Feb 11 11:57:12 2016 New Revision: 295513 URL: https://svnweb.freebsd.org/changeset/base/295513 Log: xen-netfront: remove useless NULL check in netif_free xn_ifp is allocated in create_netdev with if_alloc(IFT_ETHER). According to the current arrangement it can't be NULL. Coverity ID: 1349805 Submitted by: Wei Liu <wei.liu2@citrix.com> Reviewed by: royger Sponsored by: Citrix Systems R&D Differential revision: https://reviews.freebsd.org/D5252 Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Thu Feb 11 11:55:37 2016 (r295512) +++ head/sys/dev/xen/netfront/netfront.c Thu Feb 11 11:57:12 2016 (r295513) @@ -2280,11 +2280,9 @@ netif_free(struct netfront_info *np) netif_disconnect_backend(np); free(np->rxq, M_DEVBUF); free(np->txq, M_DEVBUF); - if (np->xn_ifp != NULL) { - ether_ifdetach(np->xn_ifp); - if_free(np->xn_ifp); - np->xn_ifp = NULL; - } + ether_ifdetach(np->xn_ifp); + if_free(np->xn_ifp); + np->xn_ifp = NULL; ifmedia_removeall(&np->sc_media); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602111157.u1BBvCAN050191>