Commit dfa322fc authored by Russell King's avatar Russell King

ARM: dmabounce: check pointer against NULL not 0

Pointers should be checked against NULL rather than 0, otherwise we
get sparse warnings.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent e2f521e2
...@@ -249,7 +249,7 @@ static inline dma_addr_t map_single(struct device *dev, void *ptr, size_t size, ...@@ -249,7 +249,7 @@ static inline dma_addr_t map_single(struct device *dev, void *ptr, size_t size,
DO_STATS ( device_info->map_op_count++ ); DO_STATS ( device_info->map_op_count++ );
buf = alloc_safe_buffer(device_info, ptr, size, dir); buf = alloc_safe_buffer(device_info, ptr, size, dir);
if (buf == 0) { if (buf == NULL) {
dev_err(dev, "%s: unable to map unsafe buffer %p!\n", dev_err(dev, "%s: unable to map unsafe buffer %p!\n",
__func__, ptr); __func__, ptr);
return ~0; return ~0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment