From owner-svn-src-all@freebsd.org Sun May 15 08:36:14 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 63AF6B327DD; Sun, 15 May 2016 08:36:14 +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 1A86B13CC; Sun, 15 May 2016 08:36:14 +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 u4F8aDSP054559; Sun, 15 May 2016 08:36:13 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4F8aDQl054557; Sun, 15 May 2016 08:36:13 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201605150836.u4F8aDQl054557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 15 May 2016 08:36:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299849 - head/sys/dev/isp 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: Sun, 15 May 2016 08:36:14 -0000 Author: trasz Date: Sun May 15 08:36:12 2016 New Revision: 299849 URL: https://svnweb.freebsd.org/changeset/base/299849 Log: Remove NULL checks after M_WAITOK allocations from isp(4). MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/isp/isp_pci.c head/sys/dev/isp/isp_sbus.c Modified: head/sys/dev/isp/isp_pci.c ============================================================================== --- head/sys/dev/isp/isp_pci.c Sun May 15 08:34:59 2016 (r299848) +++ head/sys/dev/isp/isp_pci.c Sun May 15 08:36:12 2016 (r299849) @@ -1593,11 +1593,6 @@ isp_pci_mbxdma(ispsoftc_t *isp) len = isp->isp_maxcmds * sizeof (struct isp_pcmd); isp->isp_osinfo.pcmd_pool = (struct isp_pcmd *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); - if (isp->isp_osinfo.pcmd_pool == NULL) { - isp_prt(isp, ISP_LOGERR, "cannot allocate pcmds"); - ISP_LOCK(isp); - return (1); - } if (isp->isp_osinfo.sixtyfourbit) { nsegs = ISP_NSEG64_MAX; @@ -1614,12 +1609,6 @@ isp_pci_mbxdma(ispsoftc_t *isp) len = sizeof (isp_hdl_t) * isp->isp_maxcmds; isp->isp_xflist = (isp_hdl_t *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); - if (isp->isp_xflist == NULL) { - free(isp->isp_osinfo.pcmd_pool, M_DEVBUF); - ISP_LOCK(isp); - isp_prt(isp, ISP_LOGERR, "cannot alloc xflist array"); - return (1); - } for (len = 0; len < isp->isp_maxcmds - 1; len++) { isp->isp_xflist[len].cmd = &isp->isp_xflist[len+1]; } Modified: head/sys/dev/isp/isp_sbus.c ============================================================================== --- head/sys/dev/isp/isp_sbus.c Sun May 15 08:34:59 2016 (r299848) +++ head/sys/dev/isp/isp_sbus.c Sun May 15 08:36:12 2016 (r299849) @@ -448,19 +448,8 @@ isp_sbus_mbxdma(ispsoftc_t *isp) len = sizeof (struct isp_pcmd) * isp->isp_maxcmds; isp->isp_osinfo.pcmd_pool = (struct isp_pcmd *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); - if (isp->isp_osinfo.pcmd_pool == NULL) { - isp_prt(isp, ISP_LOGERR, "cannot alloc pcmd pool"); - ISP_LOCK(isp); - return (1); - } - len = sizeof (isp_hdl_t *) * isp->isp_maxcmds; isp->isp_xflist = (isp_hdl_t *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); - if (isp->isp_xflist == NULL) { - isp_prt(isp, ISP_LOGERR, "cannot alloc xflist array"); - ISP_LOCK(isp); - return (1); - } for (len = 0; len < isp->isp_maxcmds - 1; len++) { isp->isp_xflist[len].cmd = &isp->isp_xflist[len+1]; }