From owner-svn-src-all@freebsd.org Tue May 10 10:26:08 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEE75B3539D; Tue, 10 May 2016 10:26:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80E4811B1; Tue, 10 May 2016 10:26:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4AAQ7Ja076074; Tue, 10 May 2016 10:26:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4AAQ7RX076069; Tue, 10 May 2016 10:26:07 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201605101026.u4AAQ7RX076069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 10 May 2016 10:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299353 - in head/sys: dev/acpica dev/hwpmc dev/ioat dev/xen/evtchn x86/xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 May 2016 10:26:08 -0000 Author: trasz Date: Tue May 10 10:26:07 2016 New Revision: 299353 URL: https://svnweb.freebsd.org/changeset/base/299353 Log: Remove misc NULL checks after M_WAITOK allocations. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/acpica/acpi_perf.c head/sys/dev/hwpmc/hwpmc_piv.c head/sys/dev/ioat/ioat.c head/sys/dev/xen/evtchn/evtchn_dev.c head/sys/x86/xen/pv.c Modified: head/sys/dev/acpica/acpi_perf.c ============================================================================== --- head/sys/dev/acpica/acpi_perf.c Tue May 10 10:24:35 2016 (r299352) +++ head/sys/dev/acpica/acpi_perf.c Tue May 10 10:26:07 2016 (r299353) @@ -267,8 +267,6 @@ acpi_perf_evaluate(device_t dev) sc->px_states = malloc(sc->px_count * sizeof(struct acpi_px), M_ACPIPERF, M_WAITOK | M_ZERO); - if (sc->px_states == NULL) - goto out; /* * Each state is a package of {CoreFreq, Power, TransitionLatency, Modified: head/sys/dev/hwpmc/hwpmc_piv.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_piv.c Tue May 10 10:24:35 2016 (r299352) +++ head/sys/dev/hwpmc/hwpmc_piv.c Tue May 10 10:26:07 2016 (r299353) @@ -605,9 +605,6 @@ p4_pcpu_init(struct pmc_mdep *md, int cp p4c = malloc(sizeof(struct p4_cpu), M_PMC, M_WAITOK|M_ZERO); - if (p4c == NULL) - return (ENOMEM); - pc = pmc_pcpu[cpu]; KASSERT(pc != NULL, ("[p4,%d] cpu %d null per-cpu", __LINE__, cpu)); Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Tue May 10 10:24:35 2016 (r299352) +++ head/sys/dev/ioat/ioat.c Tue May 10 10:26:07 2016 (r299353) @@ -464,8 +464,6 @@ ioat3_attach(device_t device) ioat->ring = malloc(num_descriptors * sizeof(*ring), M_IOAT, M_ZERO | M_WAITOK); - if (ioat->ring == NULL) - return (ENOMEM); ring = ioat->ring; for (i = 0; i < num_descriptors; i++) { Modified: head/sys/dev/xen/evtchn/evtchn_dev.c ============================================================================== --- head/sys/dev/xen/evtchn/evtchn_dev.c Tue May 10 10:24:35 2016 (r299352) +++ head/sys/dev/xen/evtchn/evtchn_dev.c Tue May 10 10:26:07 2016 (r299353) @@ -325,8 +325,6 @@ evtchn_write(struct cdev *dev, struct ui return (EINVAL); kbuf = malloc(PAGE_SIZE, M_EVTCHN, M_WAITOK); - if (kbuf == NULL) - return (ENOMEM); count = uio->uio_resid; /* Whole number of ports. */ Modified: head/sys/x86/xen/pv.c ============================================================================== --- head/sys/x86/xen/pv.c Tue May 10 10:24:35 2016 (r299352) +++ head/sys/x86/xen/pv.c Tue May 10 10:26:07 2016 (r299353) @@ -226,8 +226,6 @@ start_xen_ap(int cpu) bootAP = cpu; ctxt = malloc(sizeof(*ctxt), M_TEMP, M_WAITOK | M_ZERO); - if (ctxt == NULL) - panic("unable to allocate memory"); ctxt->flags = VGCF_IN_KERNEL; ctxt->user_regs.rip = (unsigned long) init_secondary;