Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys remove checks for failure after memory allocation calls ...
details: https://anonhg.NetBSD.org/src/rev/ac011599218b
branches: trunk
changeset: 354014:ac011599218b
user: chs <chs%NetBSD.org@localhost>
date: Thu Jun 01 02:45:05 2017 +0000
description:
remove checks for failure after memory allocation calls that cannot fail:
kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()
all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
diffstat:
sys/arch/amd64/amd64/netbsd32_machdep.c | 12 +-
sys/arch/arm/allwinner/awin_ac.c | 6 +-
sys/arch/arm/allwinner/awin_hdmiaudio.c | 6 +-
sys/arch/arm/arm/bootconfig.c | 7 +-
sys/arch/arm/arm32/cpu.c | 5 +-
sys/arch/arm/broadcom/bcm2835_dmac.c | 8 +-
sys/arch/arm/gemini/gemini_gmac.c | 11 +-
sys/arch/arm/nvidia/tegra_drm_fb.c | 9 +-
sys/arch/arm/nvidia/tegra_drm_gem.c | 7 +-
sys/arch/arm/nvidia/tegra_drm_mode.c | 18 +--
sys/arch/arm/omap/if_cpsw.c | 6 +-
sys/arch/arm/omap/omapl1x_emac.c | 14 +--
sys/arch/arm/pic/pic.c | 9 +-
sys/arch/arm/xscale/pxa2x0_ac97.c | 5 +-
sys/arch/arm/xscale/pxa2x0_i2s.c | 6 +-
sys/arch/hppa/dev/power.c | 10 +-
sys/arch/hppa/gsc/harmony.c | 5 +-
sys/arch/luna68k/dev/xp.c | 7 +-
sys/arch/macppc/macppc/pic_heathrow.c | 5 +-
sys/arch/macppc/macppc/pic_ohare.c | 5 +-
sys/arch/macppc/macppc/pic_u3_ht.c | 1 -
sys/arch/mips/adm5120/dev/ahci.c | 10 +-
sys/arch/powerpc/booke/e500_intr.c | 8 +-
sys/arch/powerpc/booke/pci/pq3pci.c | 10 +-
sys/arch/powerpc/marvell/pic_discovery.c | 6 +-
sys/arch/powerpc/pci/pci_machdep_common.c | 10 +-
sys/arch/powerpc/pci/pci_machdep_ofw.c | 5 +-
sys/arch/powerpc/pic/pic_distopenpic.c | 9 +-
sys/arch/powerpc/pic/pic_i8259.c | 5 +-
sys/arch/powerpc/pic/pic_mpcsoc.c | 5 +-
sys/arch/powerpc/pic/pic_openpic.c | 5 +-
sys/arch/powerpc/pic/pic_prepivr.c | 5 +-
sys/arch/sandpoint/pci/pci_machdep.c | 7 +-
sys/arch/sgimips/hpc/haltwo.c | 7 +-
sys/arch/sun3/sun3/dvma.c | 7 +-
sys/arch/usermode/dev/cpu.c | 6 +-
sys/arch/x68k/dev/vs.c | 7 +-
sys/arch/x86/pci/amdtemp.c | 7 +-
sys/arch/x86/pci/msipic.c | 11 +-
sys/arch/x86/pci/pci_intr_machdep.c | 9 +-
sys/arch/x86/pci/pci_machdep.c | 8 +-
sys/arch/x86/pci/pci_msi_machdep.c | 9 +-
sys/arch/x86/pci/pci_ranges.c | 9 +-
sys/arch/x86/x86/bus_dma.c | 8 +-
sys/arch/x86/x86/bus_space.c | 8 +-
sys/arch/x86/x86/cpu_ucode_intel.c | 8 +-
sys/arch/x86/x86/est.c | 12 +-
sys/arch/x86/x86/intr.c | 21 +---
sys/arch/x86/x86/mpacpi.c | 10 +-
sys/arch/x86/x86/mtrr_i686.c | 6 +-
sys/arch/x86/x86/nmi.c | 7 +-
sys/arch/x86/x86/odcm.c | 7 +-
sys/arch/x86/x86/powernow.c | 20 +--
sys/arch/x86/x86/vmt.c | 6 +-
sys/arch/xen/xen/privcmd.c | 13 +-
sys/arch/xen/xen/xenevt.c | 6 +-
sys/compat/netbsd32/netbsd32_fs.c | 7 +-
sys/compat/netbsd32/netbsd32_module.c | 10 +-
sys/dev/acpi/acpi.c | 7 +-
sys/dev/acpi/acpi_cpu.c | 7 +-
sys/dev/acpi/acpi_cpu_tstate.c | 8 +-
sys/dev/acpi/acpi_display.c | 34 +-----
sys/dev/acpi/acpi_pci.c | 10 +-
sys/dev/acpi/acpi_power.c | 10 +-
sys/dev/acpi/acpi_tz.c | 7 +-
sys/dev/acpi/acpi_wakedev.c | 8 +-
sys/dev/acpi/aibs_acpi.c | 9 +-
sys/dev/acpi/wmi/wmi_acpi.c | 23 +--
sys/dev/acpi/wmi/wmi_hp.c | 11 +-
sys/dev/audio.c | 7 +-
sys/dev/bluetooth/btsco.c | 6 +-
sys/dev/cardbus/rbus_ppb.c | 16 +-
sys/dev/ccd.c | 17 +--
sys/dev/dm/dm_dev.c | 7 +-
sys/dev/dm/dm_ioctl.c | 10 +-
sys/dev/dm/dm_pdev.c | 7 +-
sys/dev/dm/dm_target_linear.c | 7 +-
sys/dev/dm/dm_target_stripe.c | 11 +-
sys/dev/drm/vbox_drv.c | 9 +-
sys/dev/dtv/dtv_buffer.c | 9 +-
sys/dev/dtv/dtv_demux.c | 6 +-
sys/dev/dtv/dtv_scatter.c | 9 +-
sys/dev/fss.c | 17 +--
sys/dev/hdaudio/hdafg.c | 6 +-
sys/dev/i2c/au8522.c | 6 +-
sys/dev/i2c/cx24227.c | 7 +-
sys/dev/i2c/i2c.c | 6 +-
sys/dev/i2c/lg3303.c | 6 +-
sys/dev/i2c/mt2131.c | 7 +-
sys/dev/i2c/nxt2k.c | 7 +-
sys/dev/i2c/tvpll.c | 7 +-
sys/dev/i2c/xc3028.c | 10 +-
sys/dev/i2c/xc5k.c | 6 +-
sys/dev/i2c/zl10353.c | 8 +-
sys/dev/ic/atppc.c | 29 +--
sys/dev/ic/cs4231.c | 6 +-
sys/dev/ic/nvme.c | 20 +--
sys/dev/lockstat.c | 6 +-
sys/dev/marvell/gtidmac.c | 10 +-
sys/dev/marvell/if_mvgbe.c | 15 +--
sys/dev/midictl.c | 16 +--
sys/dev/mscp/mscp_subr.c | 12 +-
sys/dev/pad/pad.c | 9 +-
sys/dev/pci/auacer.c | 6 +-
sys/dev/pci/auich.c | 6 +-
sys/dev/pci/auixp.c | 8 +-
sys/dev/pci/autri.c | 6 +-
sys/dev/pci/auvia.c | 6 +-
sys/dev/pci/azalia.c | 13 +-
sys/dev/pci/azalia_codec.c | 53 +--------
sys/dev/pci/cmpci.c | 9 +-
sys/dev/pci/coram.c | 9 +-
sys/dev/pci/cs428x.c | 10 +-
sys/dev/pci/cxdtv.c | 11 +-
sys/dev/pci/eap.c | 6 +-
sys/dev/pci/emuxki.c | 17 +--
sys/dev/pci/esa.c | 13 +-
sys/dev/pci/eso.c | 7 +-
sys/dev/pci/fms.c | 8 +-
sys/dev/pci/gcscaudio.c | 6 +-
sys/dev/pci/if_iwm.c | 24 +---
sys/dev/pci/if_vioif.c | 7 +-
sys/dev/pci/ixgbe/ixgbe_netbsd.c | 9 +-
sys/dev/pci/nvme_pci.c | 17 +--
sys/dev/pci/pci_stub.c | 5 +-
sys/dev/pci/sv.c | 6 +-
sys/dev/pci/virtio.c | 16 +--
sys/dev/pci/wcfb.c | 9 +-
sys/dev/pci/yds.c | 6 +-
sys/dev/raidframe/rf_netbsdkintf.c | 10 +-
sys/dev/rasops/rasops.c | 9 +-
sys/dev/sequencer.c | 10 +-
sys/dev/sysmon/sysmon_envsys_events.c | 7 +-
sys/dev/tc/bba.c | 6 +-
sys/dev/usb/auvitek_audio.c | 8 +-
sys/dev/usb/hid.c | 6 +-
sys/dev/usb/if_athn_usb.c | 9 +-
sys/dev/usb/if_kue.c | 9 +-
sys/dev/usb/if_otus.c | 9 +-
sys/dev/usb/if_urndis.c | 61 +--------
sys/dev/usb/if_zyd.c | 6 +-
sys/dev/usb/uaudio.c | 14 +-
sys/dev/usb/ubt.c | 8 +-
sys/dev/usb/udl.c | 20 +--
sys/dev/usb/udsir.c | 9 +-
sys/dev/usb/uhci.c | 6 +-
sys/dev/usb/uhidev.c | 20 +--
sys/dev/usb/uhub.c | 15 +--
sys/dev/usb/umidi.c | 15 +--
sys/dev/usb/usb_mem.c | 13 +-
sys/dev/usb/usb_subr.c | 53 ++------
sys/dev/usb/usbdi.c | 10 +-
sys/dev/usb/usbdi_util.c | 6 +-
sys/dev/usb/ustir.c | 9 +-
sys/dev/usb/utoppy.c | 15 +--
sys/dev/usb/uvideo.c | 28 +----
sys/dev/usb/xhci.c | 7 +-
sys/dev/video.c | 36 +-----
sys/dev/wscons/wsdisplay_glyphcache.c | 6 +-
sys/dev/wsfb/genfb.c | 6 +-
sys/external/bsd/drm2/pci/drm_pci.c | 6 +-
sys/external/bsd/dwc2/dwc2.c | 15 +--
sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_2835_arm.c | 5 -
sys/fs/adosfs/advfsops.c | 9 +-
sys/fs/tmpfs/tmpfs_vfsops.c | 7 +-
sys/fs/union/union_subr.c | 8 +-
sys/fs/unionfs/unionfs_subr.c | 3 -
sys/fs/v7fs/v7fs_io_kern.c | 19 +--
sys/fs/v7fs/v7fs_vfsops.c | 7 +-
sys/kern/init_sysctl.c | 8 +-
sys/kern/kern_acct.c | 6 +-
sys/kern/kern_auth.c | 16 +--
sys/kern/kern_descrip.c | 8 +-
sys/kern/kern_drvctl.c | 10 +-
sys/kern/kern_ktrace.c | 10 +-
sys/kern/kern_lwp.c | 9 +-
sys/kern/kern_module.c | 12 +-
sys/kern/kern_module_vfs.c | 9 +-
sys/kern/kern_runq.c | 7 +-
sys/kern/kern_timeout.c | 6 +-
sys/kern/subr_autoconf.c | 21 +---
sys/kern/subr_disk.c | 6 +-
sys/kern/subr_interrupt.c | 7 +-
sys/kern/subr_iostat.c | 7 +-
sys/kern/subr_kobj.c | 8 +-
sys/kern/subr_kobj_vfs.c | 8 +-
sys/kern/subr_lockdebug.c | 7 +-
sys/kern/subr_psref.c | 13 +-
sys/kern/subr_specificdata.c | 7 +-
sys/kern/sys_aio.c | 6 +-
sys/kern/sys_generic.c | 18 +--
sys/kern/sys_lwp.c | 11 +-
sys/kern/sys_module.c | 13 +-
sys/kern/sys_select.c | 16 +-
sys/kern/tty_subr.c | 15 +-
sys/kern/vfs_getcwd.c | 7 +-
sys/kern/vfs_lookup.c | 10 +-
sys/kern/vfs_mount.c | 7 +-
sys/kern/vfs_syscalls.c | 11 +-
sys/miscfs/genfs/layer_vfsops.c | 9 +-
sys/miscfs/specfs/spec_vnops.c | 12 +-
sys/net/if.c | 13 +-
sys/net/if_gif.c | 8 +-
sys/net/if_l2tp.c | 6 +-
sys/net/net_stats.c | 7 +-
sys/net/npf/lpm.c | 8 +-
sys/net/npf/npf.c | 8 +-
sys/net/pktqueue.c | 8 +-
sys/net/rtbl.c | 7 +-
sys/net/rtsock.c | 9 +-
sys/netcan/can_pcb.c | 6 +-
sys/netinet/in.c | 5 +-
sys/netinet/ip_encap.c | 6 +-
sys/netinet/ip_input.c | 8 +-
sys/netinet/tcp_vtw.c | 5 +-
sys/netinet6/ip6_input.c | 7 +-
sys/netinet6/nd6.c | 6 +-
sys/netinet6/raw_ip6.c | 8 +-
sys/netipsec/ipsec.c | 14 +-
sys/ufs/chfs/chfs_gc.c | 5 +-
sys/ufs/chfs/chfs_readinode.c | 14 +--
sys/ufs/chfs/chfs_scan.c | 4 +-
sys/ufs/ffs/ffs_snapshot.c | 7 +-
sys/uvm/uvm_bio.c | 6 +-
sys/uvm/uvm_km.c | 6 +-
sys/uvm/uvm_page.c | 9 +-
226 files changed, 524 insertions(+), 1751 deletions(-)
diffs (truncated from 8016 to 300 lines):
diff -r 8a45c7336819 -r ac011599218b sys/arch/amd64/amd64/netbsd32_machdep.c
--- a/sys/arch/amd64/amd64/netbsd32_machdep.c Thu Jun 01 02:03:07 2017 +0000
+++ b/sys/arch/amd64/amd64/netbsd32_machdep.c Thu Jun 01 02:45:05 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_machdep.c,v 1.104 2017/02/23 03:34:22 kamil Exp $ */
+/* $NetBSD: netbsd32_machdep.c,v 1.105 2017/06/01 02:45:05 chs Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.104 2017/02/23 03:34:22 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.105 2017/06/01 02:45:05 chs Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -778,10 +778,6 @@
size = n * sizeof(struct mtrr);
m64p = kmem_zalloc(size, KM_SLEEP);
- if (m64p == NULL) {
- error = ENOMEM;
- goto fail;
- }
error = mtrr_get(m64p, &n, l->l_proc, 0);
if (error != 0)
goto fail;
@@ -843,10 +839,6 @@
size = n * sizeof(struct mtrr);
m64p = kmem_zalloc(size, KM_SLEEP);
- if (m64p == NULL) {
- error = ENOMEM;
- goto fail;
- }
m32p = (struct mtrr32 *)(uintptr_t)args32.mtrrp;
mp = m64p;
for (i = 0; i < n; i++) {
diff -r 8a45c7336819 -r ac011599218b sys/arch/arm/allwinner/awin_ac.c
--- a/sys/arch/arm/allwinner/awin_ac.c Thu Jun 01 02:03:07 2017 +0000
+++ b/sys/arch/arm/allwinner/awin_ac.c Thu Jun 01 02:45:05 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_ac.c,v 1.16 2014/10/20 21:18:00 jmcneill Exp $ */
+/* $NetBSD: awin_ac.c,v 1.17 2017/06/01 02:45:05 chs Exp $ */
/*-
* Copyright (c) 2014 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awin_ac.c,v 1.16 2014/10/20 21:18:00 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_ac.c,v 1.17 2017/06/01 02:45:05 chs Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -1018,8 +1018,6 @@
int error;
dma = kmem_alloc(sizeof(*dma), KM_SLEEP);
- if (dma == NULL)
- return NULL;
error = awinac_allocdma(sc, size, 16, dma);
if (error) {
diff -r 8a45c7336819 -r ac011599218b sys/arch/arm/allwinner/awin_hdmiaudio.c
--- a/sys/arch/arm/allwinner/awin_hdmiaudio.c Thu Jun 01 02:03:07 2017 +0000
+++ b/sys/arch/arm/allwinner/awin_hdmiaudio.c Thu Jun 01 02:45:05 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_hdmiaudio.c,v 1.6 2015/11/19 18:48:22 bouyer Exp $ */
+/* $NetBSD: awin_hdmiaudio.c,v 1.7 2017/06/01 02:45:05 chs Exp $ */
/*-
* Copyright (c) 2014 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awin_hdmiaudio.c,v 1.6 2015/11/19 18:48:22 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_hdmiaudio.c,v 1.7 2017/06/01 02:45:05 chs Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -498,8 +498,6 @@
int error;
dma = kmem_alloc(sizeof(*dma), KM_SLEEP);
- if (dma == NULL)
- return NULL;
error = awin_hdmiaudio_allocdma(sc, size, 16, dma);
if (error) {
diff -r 8a45c7336819 -r ac011599218b sys/arch/arm/arm/bootconfig.c
--- a/sys/arch/arm/arm/bootconfig.c Thu Jun 01 02:03:07 2017 +0000
+++ b/sys/arch/arm/arm/bootconfig.c Thu Jun 01 02:45:05 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bootconfig.c,v 1.10 2017/05/28 23:31:41 jmcneill Exp $ */
+/* $NetBSD: bootconfig.c,v 1.11 2017/06/01 02:45:05 chs Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -40,7 +40,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: bootconfig.c,v 1.10 2017/05/28 23:31:41 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bootconfig.c,v 1.11 2017/06/01 02:45:05 chs Exp $");
#include <sys/systm.h>
#include <sys/kmem.h>
@@ -163,9 +163,6 @@
}
ret = kmem_alloc(i + 1, KM_SLEEP);
- if (ret == NULL)
- return NULL;
-
strlcpy(ret, s, i + 1);
return ret;
}
diff -r 8a45c7336819 -r ac011599218b sys/arch/arm/arm32/cpu.c
--- a/sys/arch/arm/arm32/cpu.c Thu Jun 01 02:03:07 2017 +0000
+++ b/sys/arch/arm/arm32/cpu.c Thu Jun 01 02:45:05 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.114 2016/07/11 14:35:00 kiyohara Exp $ */
+/* $NetBSD: cpu.c,v 1.115 2017/06/01 02:45:05 chs Exp $ */
/*
* Copyright (c) 1995 Mark Brinicombe.
@@ -46,7 +46,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.114 2016/07/11 14:35:00 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.115 2017/06/01 02:45:05 chs Exp $");
#include <sys/systm.h>
#include <sys/conf.h>
@@ -96,7 +96,6 @@
#ifdef MULTIPROCESSOR
KASSERT(cpu_info[id] == NULL);
ci = kmem_zalloc(sizeof(*ci), KM_SLEEP);
- KASSERT(ci != NULL);
ci->ci_cpl = IPL_HIGH;
ci->ci_cpuid = id;
uint32_t mpidr = armreg_mpidr_read();
diff -r 8a45c7336819 -r ac011599218b sys/arch/arm/broadcom/bcm2835_dmac.c
--- a/sys/arch/arm/broadcom/bcm2835_dmac.c Thu Jun 01 02:03:07 2017 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_dmac.c Thu Jun 01 02:45:05 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_dmac.c,v 1.14 2015/08/09 13:07:47 mlelstv Exp $ */
+/* $NetBSD: bcm2835_dmac.c,v 1.15 2017/06/01 02:45:05 chs Exp $ */
/*-
* Copyright (c) 2014 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_dmac.c,v 1.14 2015/08/09 13:07:47 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_dmac.c,v 1.15 2017/06/01 02:45:05 chs Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -132,10 +132,6 @@
sc->sc_nchannels = 31 - __builtin_clz(sc->sc_channelmask);
sc->sc_channels = kmem_alloc(
sizeof(*sc->sc_channels) * sc->sc_nchannels, KM_SLEEP);
- if (sc->sc_channels == NULL) {
- aprint_error(": couldn't allocate channels\n");
- return;
- }
aprint_normal(":");
for (index = 0; index < sc->sc_nchannels; index++) {
diff -r 8a45c7336819 -r ac011599218b sys/arch/arm/gemini/gemini_gmac.c
--- a/sys/arch/arm/gemini/gemini_gmac.c Thu Jun 01 02:03:07 2017 +0000
+++ b/sys/arch/arm/gemini/gemini_gmac.c Thu Jun 01 02:45:05 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gemini_gmac.c,v 1.12 2017/03/28 08:47:19 ozaki-r Exp $ */
+/* $NetBSD: gemini_gmac.c,v 1.13 2017/06/01 02:45:05 chs Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -49,7 +49,7 @@
#include <sys/gpio.h>
-__KERNEL_RCSID(0, "$NetBSD: gemini_gmac.c,v 1.12 2017/03/28 08:47:19 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gemini_gmac.c,v 1.13 2017/06/01 02:45:05 chs Exp $");
#define SWFREEQ_DESCS 256 /* one page worth */
#define HWFREEQ_DESCS 256 /* one page worth */
@@ -961,9 +961,6 @@
KASSERT((ndesc & (ndesc - 1)) == 0);
hqm = kmem_zalloc(sizeof(*hqm), KM_SLEEP);
- if (hqm == NULL)
- return NULL;
-
hqm->hqm_memsize = nqueue * sizeof(gmac_desc_t [ndesc]);
hqm->hqm_mc = mc;
hqm->hqm_dmat = mc->mc_dmat;
@@ -1048,11 +1045,7 @@
KASSERT((hqm->hqm_refs & (1 << qno)) == 0);
hwq = kmem_zalloc(sizeof(*hwq), KM_SLEEP);
- if (hwq == NULL)
- return NULL;
-
hwq->hwq_size = hqm->hqm_ndesc;
-
hwq->hwq_iot = iot;
bus_space_subregion(iot, ioh, qrwptr, sizeof(uint32_t),
&hwq->hwq_qrwptr_ioh);
diff -r 8a45c7336819 -r ac011599218b sys/arch/arm/nvidia/tegra_drm_fb.c
--- a/sys/arch/arm/nvidia/tegra_drm_fb.c Thu Jun 01 02:03:07 2017 +0000
+++ b/sys/arch/arm/nvidia/tegra_drm_fb.c Thu Jun 01 02:45:05 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_drm_fb.c,v 1.4 2016/12/17 12:11:38 maya Exp $ */
+/* $NetBSD: tegra_drm_fb.c,v 1.5 2017/06/01 02:45:05 chs Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_drm_fb.c,v 1.4 2016/12/17 12:11:38 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_drm_fb.c,v 1.5 2017/06/01 02:45:05 chs Exp $");
#include <drm/drmP.h>
#include <drm/drm_crtc.h>
@@ -53,8 +53,6 @@
int error;
fbdev = kmem_zalloc(sizeof(*fbdev), KM_SLEEP);
- if (fbdev == NULL)
- return -ENOMEM;
fbdev->helper.funcs = &tegra_fb_helper_funcs;
error = drm_fb_helper_init(ddev, &fbdev->helper, 2, 1);
@@ -76,9 +74,6 @@
*/
fbdev->helper.fb =
kmem_zalloc(sizeof(struct tegra_framebuffer), KM_SLEEP);
- if (fbdev->helper.fb == NULL) {
- DRM_ERROR("failed to create framebuffer\n");
- }
drm_fb_helper_single_add_all_connectors(&fbdev->helper);
diff -r 8a45c7336819 -r ac011599218b sys/arch/arm/nvidia/tegra_drm_gem.c
--- a/sys/arch/arm/nvidia/tegra_drm_gem.c Thu Jun 01 02:03:07 2017 +0000
+++ b/sys/arch/arm/nvidia/tegra_drm_gem.c Thu Jun 01 02:45:05 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_drm_gem.c,v 1.2 2015/11/16 21:41:29 jmcneill Exp $ */
+/* $NetBSD: tegra_drm_gem.c,v 1.3 2017/06/01 02:45:05 chs Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_drm_gem.c,v 1.2 2015/11/16 21:41:29 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_drm_gem.c,v 1.3 2017/06/01 02:45:05 chs Exp $");
#include <drm/drmP.h>
#include <uvm/uvm.h>
@@ -42,9 +42,6 @@
int error, nsegs;
obj = kmem_zalloc(sizeof(*obj), KM_SLEEP);
- if (obj == NULL)
- return NULL;
-
obj->dmat = sc->sc_dmat;
obj->dmasize = size;
diff -r 8a45c7336819 -r ac011599218b sys/arch/arm/nvidia/tegra_drm_mode.c
--- a/sys/arch/arm/nvidia/tegra_drm_mode.c Thu Jun 01 02:03:07 2017 +0000
+++ b/sys/arch/arm/nvidia/tegra_drm_mode.c Thu Jun 01 02:45:05 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_drm_mode.c,v 1.14 2017/04/26 01:42:46 jmcneill Exp $ */
+/* $NetBSD: tegra_drm_mode.c,v 1.15 2017/06/01 02:45:05 chs Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_drm_mode.c,v 1.14 2017/04/26 01:42:46 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_drm_mode.c,v 1.15 2017/06/01 02:45:05 chs Exp $");
#include <drm/drmP.h>
#include <drm/drm_crtc.h>
Home |
Main Index |
Thread Index |
Old Index