From owner-svn-src-head@freebsd.org Tue Jul 21 23:44:37 2015 Return-Path: Delivered-To: svn-src-head@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 A18369A7F15; Tue, 21 Jul 2015 23:44:37 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 92C391C82; Tue, 21 Jul 2015 23:44:37 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6LNiba9019492; Tue, 21 Jul 2015 23:44:37 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6LNibE3019491; Tue, 21 Jul 2015 23:44:37 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201507212344.t6LNibE3019491@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 21 Jul 2015 23:44:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285781 - head/sys/cddl/dev/fbt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2015 23:44:37 -0000 Author: markj Date: Tue Jul 21 23:44:36 2015 New Revision: 285781 URL: https://svnweb.freebsd.org/changeset/base/285781 Log: Remove checks for a NULL return value from M_WAITOK allocations. Modified: head/sys/cddl/dev/fbt/fbt.c Modified: head/sys/cddl/dev/fbt/fbt.c ============================================================================== --- head/sys/cddl/dev/fbt/fbt.c Tue Jul 21 23:42:56 2015 (r285780) +++ head/sys/cddl/dev/fbt/fbt.c Tue Jul 21 23:44:36 2015 (r285781) @@ -334,9 +334,7 @@ fbt_ctfoff_init(modctl_t *lf, linker_ctf return (EINVAL); } - if ((ctfoff = malloc(sizeof(uint32_t) * lc->nsym, M_LINKER, M_WAITOK)) == NULL) - return (ENOMEM); - + ctfoff = malloc(sizeof(uint32_t) * lc->nsym, M_LINKER, M_WAITOK); *lc->ctfoffp = ctfoff; for (i = 0; i < lc->nsym; i++, ctfoff++, symp++) { @@ -515,8 +513,8 @@ fbt_typoff_init(linker_ctf_t *lc) ctf_typemax++; *lc->typlenp = ctf_typemax; - if ((xp = malloc(sizeof(uint32_t) * ctf_typemax, M_LINKER, M_ZERO | M_WAITOK)) == NULL) - return (ENOMEM); + xp = malloc(sizeof(uint32_t) * ctf_typemax, M_LINKER, + M_ZERO | M_WAITOK); *lc->typoffp = xp; @@ -838,11 +836,7 @@ ctf_decl_push(ctf_decl_t *cd, linker_ctf prec = CTF_PREC_BASE; } - if ((cdp = malloc(sizeof (ctf_decl_node_t), M_FBT, M_WAITOK)) == NULL) { - cd->cd_err = EAGAIN; - return; - } - + cdp = malloc(sizeof(*cdp), M_FBT, M_WAITOK); cdp->cd_type = type; cdp->cd_kind = kind; cdp->cd_n = n;