svn commit: r303873 - head/sys/dev/msk
Edward Tomasz Napierala
trasz at FreeBSD.org
Tue Aug 9 15:51:12 UTC 2016
Author: trasz
Date: Tue Aug 9 15:51:11 2016
New Revision: 303873
URL: https://svnweb.freebsd.org/changeset/base/303873
Log:
Remove NULL checks after M_WAITOK allocations from msk(4).
MFC after: 1 month
Modified:
head/sys/dev/msk/if_msk.c
Modified: head/sys/dev/msk/if_msk.c
==============================================================================
--- head/sys/dev/msk/if_msk.c Tue Aug 9 15:50:03 2016 (r303872)
+++ head/sys/dev/msk/if_msk.c Tue Aug 9 15:51:11 2016 (r303873)
@@ -1953,12 +1953,6 @@ mskc_attach(device_t dev)
goto fail;
}
mmd = malloc(sizeof(struct msk_mii_data), M_DEVBUF, M_WAITOK | M_ZERO);
- if (mmd == NULL) {
- device_printf(dev, "failed to allocate memory for "
- "ivars of PORT_A\n");
- error = ENXIO;
- goto fail;
- }
mmd->port = MSK_PORT_A;
mmd->pmd = sc->msk_pmd;
mmd->mii_flags |= MIIF_DOPAUSE;
@@ -1977,12 +1971,6 @@ mskc_attach(device_t dev)
}
mmd = malloc(sizeof(struct msk_mii_data), M_DEVBUF, M_WAITOK |
M_ZERO);
- if (mmd == NULL) {
- device_printf(dev, "failed to allocate memory for "
- "ivars of PORT_B\n");
- error = ENXIO;
- goto fail;
- }
mmd->port = MSK_PORT_B;
mmd->pmd = sc->msk_pmd;
if (sc->msk_pmd == 'L' || sc->msk_pmd == 'S')
More information about the svn-src-head
mailing list