Don't reference pointer before testing whether it is

NULL.

Submitted by:	Clement Lecigne <clecigne google com>
Reviewed by:	grehan
MFC after:	3 days
This commit is contained in:
delphij 2013-10-29 22:42:30 +00:00
parent 352d20048f
commit ebba0d128d

View File

@ -621,13 +621,15 @@ netvsc_recv(struct hv_device *device_ctx, netvsc_packet *packet)
{
hn_softc_t *sc = (hn_softc_t *)device_get_softc(device_ctx->device);
struct mbuf *m_new;
struct ifnet *ifp = sc->hn_ifp;
struct ifnet *ifp;
int size;
int i;
if (sc == NULL) {
return (0); /* TODO: KYS how can this be! */
}
ifp = sc->hn_ifp;
ifp = sc->arpcom.ac_ifp;