From owner-svn-src-head@FreeBSD.ORG Sat Jun 29 16:49:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3B1CD817; Sat, 29 Jun 2013 16:49:01 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2BDC91CD5; Sat, 29 Jun 2013 16:49:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5TGn1AA037647; Sat, 29 Jun 2013 16:49:01 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5TGn1QS037646; Sat, 29 Jun 2013 16:49:01 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201306291649.r5TGn1QS037646@svn.freebsd.org> From: Adrian Chadd Date: Sat, 29 Jun 2013 16:49:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252381 - head/sys/contrib/dev/ath/ath_hal/ar9300 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.14 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: Sat, 29 Jun 2013 16:49:01 -0000 Author: adrian Date: Sat Jun 29 16:49:00 2013 New Revision: 252381 URL: http://svnweb.freebsd.org/changeset/base/252381 Log: Check the return value from ath_hal_malloc() Reported by: uqs Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Sat Jun 29 16:45:37 2013 (r252380) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Sat Jun 29 16:49:00 2013 (r252381) @@ -639,6 +639,11 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC /* FreeBSD: to make OTP work for now, provide this.. */ AH9300(ah)->ah_cal_mem = ath_hal_malloc(HOST_CALDATA_SIZE); + if (AH9300(ah)->ah_cal_mem == NULL) { + ath_hal_printf(ah, "%s: caldata malloc failed!\n", __func__); + ecode = HAL_EIO; + goto bad; + } /* * If eepromdata is not NULL, copy it it into ah_cal_mem.