svn commit: r325938 - stable/9/sys/ofed/include/linux
Hans Petter Selasky
hselasky at FreeBSD.org
Fri Nov 17 15:32:29 UTC 2017
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;
More information about the svn-src-stable-9
mailing list