From owner-svn-src-stable-9@freebsd.org Fri Nov 17 15:32:29 2017 Return-Path: Delivered-To: svn-src-stable-9@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 09946DDCE21; Fri, 17 Nov 2017 15:32:29 +0000 (UTC) (envelope-from hselasky@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 C90426A909; Fri, 17 Nov 2017 15:32:28 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAHFWRpT078624; Fri, 17 Nov 2017 15:32:27 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHFWRSB078623; Fri, 17 Nov 2017 15:32:27 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201711171532.vAHFWRSB078623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 17 Nov 2017 15:32:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r325938 - stable/9/sys/ofed/include/linux X-SVN-Group: stable-9 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/9/sys/ofed/include/linux X-SVN-Commit-Revision: 325938 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 15:32:29 -0000 Author: hselasky Date: Fri Nov 17 15:32:27 2017 New Revision: 325938 URL: https://svnweb.freebsd.org/changeset/base/325938 Log: MFC r325533: Make the dma_alloc_coherent() function in the LinuxKPI NULL safe with regard to the "dev" argument. Submitted by: Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communications Modified: stable/9/sys/ofed/include/linux/dma-mapping.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/include/linux/dma-mapping.h ============================================================================== --- stable/9/sys/ofed/include/linux/dma-mapping.h Fri Nov 17 15:30:36 2017 (r325937) +++ stable/9/sys/ofed/include/linux/dma-mapping.h Fri Nov 17 15:32:27 2017 (r325938) @@ -126,7 +126,7 @@ dma_alloc_coherent(struct device *dev, size_t size, dm size_t align; void *mem; - if (dev->dma_mask) + if (dev != NULL && dev->dma_mask) high = *dev->dma_mask; else high = BUS_SPACE_MAXADDR_32BIT;