svn commit: r303879 - in head/sys/arm: broadcom/bcm2835 xscale/pxa
Edward Tomasz Napierala
trasz at FreeBSD.org
Tue Aug 9 16:02:36 UTC 2016
Author: trasz
Date: Tue Aug 9 16:02:35 2016
New Revision: 303879
URL: https://svnweb.freebsd.org/changeset/base/303879
Log:
Remove some NULL checks after M_WAITOK allocations from sys/arm/.
MFC after: 1 month
Modified:
head/sys/arm/broadcom/bcm2835/bcm2835_vcio.c
head/sys/arm/xscale/pxa/pxa_smi.c
head/sys/arm/xscale/pxa/pxa_space.c
Modified: head/sys/arm/broadcom/bcm2835/bcm2835_vcio.c
==============================================================================
--- head/sys/arm/broadcom/bcm2835/bcm2835_vcio.c Tue Aug 9 15:59:57 2016 (r303878)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_vcio.c Tue Aug 9 16:02:35 2016 (r303879)
@@ -68,10 +68,6 @@ vcio_ioctl(struct cdev *dev, u_long cmd,
if (error != 0)
break;
property = malloc(size, M_VCIO, M_WAITOK);
- if (property == NULL) {
- error = ENOMEM;
- break;
- }
error = copyin(ptr, property, size);
if (error) {
Modified: head/sys/arm/xscale/pxa/pxa_smi.c
==============================================================================
--- head/sys/arm/xscale/pxa/pxa_smi.c Tue Aug 9 15:59:57 2016 (r303878)
+++ head/sys/arm/xscale/pxa/pxa_smi.c Tue Aug 9 16:02:35 2016 (r303879)
@@ -322,8 +322,6 @@ pxa_smi_add_device(device_t dev, const c
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) {
Modified: head/sys/arm/xscale/pxa/pxa_space.c
==============================================================================
--- head/sys/arm/xscale/pxa/pxa_space.c Tue Aug 9 15:59:57 2016 (r303878)
+++ head/sys/arm/xscale/pxa/pxa_space.c Tue Aug 9 16:02:35 2016 (r303879)
@@ -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;
More information about the svn-src-head
mailing list