From owner-svn-src-all@freebsd.org Tue May 10 10:21:05 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 51337B35073; Tue, 10 May 2016 10:21:05 +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 2BD291C15; Tue, 10 May 2016 10:21:05 +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 u4AAL4Zi073182; Tue, 10 May 2016 10:21:04 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4AAL3iR073177; Tue, 10 May 2016 10:21:03 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201605101021.u4AAL3iR073177@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:21:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299351 - head/sys/dev/firewire 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:21:05 -0000 Author: trasz Date: Tue May 10 10:21:03 2016 New Revision: 299351 URL: https://svnweb.freebsd.org/changeset/base/299351 Log: Remove NULL checks after M_WAITOK allocations from firewire. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/firewire/fwdev.c head/sys/dev/firewire/fwdma.c head/sys/dev/firewire/fwmem.c head/sys/dev/firewire/fwohci.c head/sys/dev/firewire/if_fwe.c Modified: head/sys/dev/firewire/fwdev.c ============================================================================== --- head/sys/dev/firewire/fwdev.c Tue May 10 09:58:51 2016 (r299350) +++ head/sys/dev/firewire/fwdev.c Tue May 10 10:21:03 2016 (r299351) @@ -102,8 +102,6 @@ fwdev_allocbuf(struct firewire_comm *fc, q->bulkxfer = malloc(sizeof(struct fw_bulkxfer) * b->nchunk, M_FW, M_WAITOK); - if (q->bulkxfer == NULL) - return (ENOMEM); b->psize = roundup2(b->psize, sizeof(uint32_t)); q->buf = fwdma_malloc_multiseg(fc, sizeof(uint32_t), @@ -179,8 +177,6 @@ fw_open(struct cdev *dev, int flags, int FW_GUNLOCK(sc->fc); dev->si_drv1 = malloc(sizeof(struct fw_drv1), M_FW, M_WAITOK | M_ZERO); - if (dev->si_drv1 == NULL) - return (ENOMEM); if ((dev->si_flags & SI_NAMED) == 0) { int unit = DEV2UNIT(dev); @@ -742,10 +738,6 @@ out: break; } fwb = malloc(sizeof(struct fw_bind), M_FW, M_WAITOK); - if (fwb == NULL) { - err = ENOMEM; - break; - } fwb->start = ((u_int64_t)bindreq->start.hi << 32) | bindreq->start.lo; fwb->end = fwb->start + bindreq->len; Modified: head/sys/dev/firewire/fwdma.c ============================================================================== --- head/sys/dev/firewire/fwdma.c Tue May 10 09:58:51 2016 (r299350) +++ head/sys/dev/firewire/fwdma.c Tue May 10 10:21:03 2016 (r299351) @@ -160,10 +160,6 @@ fwdma_malloc_multiseg(struct firewire_co } am = (struct fwdma_alloc_multi *)malloc(sizeof(struct fwdma_alloc_multi) + sizeof(struct fwdma_seg)*nseg, M_FW, M_WAITOK); - if (am == NULL) { - printf("fwdma_malloc_multiseg: malloc failed\n"); - return (NULL); - } am->ssize = ssize; am->esize = esize; am->nseg = 0; Modified: head/sys/dev/firewire/fwmem.c ============================================================================== --- head/sys/dev/firewire/fwmem.c Tue May 10 09:58:51 2016 (r299350) +++ head/sys/dev/firewire/fwmem.c Tue May 10 10:21:03 2016 (r299351) @@ -287,8 +287,6 @@ fwmem_open(struct cdev *dev, int flags, FW_GUNLOCK(sc->fc); dev->si_drv1 = malloc(sizeof(struct fwmem_softc), M_FWMEM, M_WAITOK); - if (dev->si_drv1 == NULL) - return (ENOMEM); dev->si_iosize_max = DFLTPHYS; fms = dev->si_drv1; bcopy(&fwmem_eui64, &fms->eui, sizeof(struct fw_eui64)); Modified: head/sys/dev/firewire/fwohci.c ============================================================================== --- head/sys/dev/firewire/fwohci.c Tue May 10 09:58:51 2016 (r299350) +++ head/sys/dev/firewire/fwohci.c Tue May 10 10:21:03 2016 (r299351) @@ -1247,10 +1247,6 @@ fwohci_db_init(struct fwohci_softc *sc, db_tr = (struct fwohcidb_tr *) malloc(sizeof(struct fwohcidb_tr) * dbch->ndb, M_FW, M_WAITOK | M_ZERO); - if (db_tr == NULL) { - printf("fwohci_db_init: malloc(1) failed\n"); - return; - } #define DB_SIZE(x) (sizeof(struct fwohcidb) * (x)->ndesc) dbch->am = fwdma_malloc_multiseg(&sc->fc, sizeof(struct fwohcidb), Modified: head/sys/dev/firewire/if_fwe.c ============================================================================== --- head/sys/dev/firewire/if_fwe.c Tue May 10 09:58:51 2016 (r299350) +++ head/sys/dev/firewire/if_fwe.c Tue May 10 10:21:03 2016 (r299351) @@ -307,10 +307,6 @@ fwe_init(void *arg) xferq->bulkxfer = (struct fw_bulkxfer *) malloc( sizeof(struct fw_bulkxfer) * xferq->bnchunk, M_FWE, M_WAITOK); - if (xferq->bulkxfer == NULL) { - printf("if_fwe: malloc failed\n"); - return; - } STAILQ_INIT(&xferq->stvalid); STAILQ_INIT(&xferq->stfree); STAILQ_INIT(&xferq->stdma);