From a0f6b98c9548673e21df765d268a8dcbc17fa07c Mon Sep 17 00:00:00 2001 From: trasz Date: Tue, 9 Aug 2016 16:02:35 +0000 Subject: [PATCH] Remove some NULL checks after M_WAITOK allocations from sys/arm/. MFC after: 1 month --- sys/arm/broadcom/bcm2835/bcm2835_vcio.c | 4 ---- sys/arm/xscale/pxa/pxa_smi.c | 2 -- sys/arm/xscale/pxa/pxa_space.c | 3 --- 3 files changed, 9 deletions(-) diff --git a/sys/arm/broadcom/bcm2835/bcm2835_vcio.c b/sys/arm/broadcom/bcm2835/bcm2835_vcio.c index 4c215c6eeebc..40fb4e0ad8ee 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_vcio.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_vcio.c @@ -68,10 +68,6 @@ vcio_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int mode, if (error != 0) break; property = malloc(size, M_VCIO, M_WAITOK); - if (property == NULL) { - error = ENOMEM; - break; - } error = copyin(ptr, property, size); if (error) { diff --git a/sys/arm/xscale/pxa/pxa_smi.c b/sys/arm/xscale/pxa/pxa_smi.c index b08a7c7ac1e0..64fc50c19ceb 100644 --- a/sys/arm/xscale/pxa/pxa_smi.c +++ b/sys/arm/xscale/pxa/pxa_smi.c @@ -322,8 +322,6 @@ pxa_smi_add_device(device_t dev, const char *name, int unit) ivars = (struct smi_ivars *)malloc( sizeof(struct smi_ivars), M_PXASMI, M_WAITOK); - if (ivars == NULL) - return; child = device_add_child(dev, name, unit); if (child == NULL) { diff --git a/sys/arm/xscale/pxa/pxa_space.c b/sys/arm/xscale/pxa/pxa_space.c index 35b6cd9f4223..eb8314aeb8e3 100644 --- a/sys/arm/xscale/pxa/pxa_space.c +++ b/sys/arm/xscale/pxa/pxa_space.c @@ -191,9 +191,6 @@ pxa_bus_tag_alloc(bus_addr_t offset) tag = (struct bus_space *)malloc(sizeof(struct bus_space), M_PXATAG, M_WAITOK); - if (tag == NULL) { - return (NULL); - } bcopy(&_base_tag, tag, sizeof(struct bus_space)); tag->bs_privdata = (void *)offset;