Date: Tue, 9 Aug 2016 16:02:35 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303879 - in head/sys/arm: broadcom/bcm2835 xscale/pxa Message-ID: <201608091602.u79G2Zik088193@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608091602.u79G2Zik088193>