diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-07-03 18:54:34 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-07-03 18:54:34 -0400 |
commit | dfa322fceb15227c07670c415e835d2dfa8a4307 (patch) | |
tree | 2c5c9a8589ddc165ed1af59796fabd27b9ef7e79 /arch/arm/common | |
parent | e2f521e247576c897e1bf0ada801e87c7e2db89f (diff) |
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: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/common')
-rw-r--r-- | arch/arm/common/dmabounce.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index 0077c1b7d7ff..b4a8759e0fa4 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c | |||
@@ -249,7 +249,7 @@ static inline dma_addr_t map_single(struct device *dev, void *ptr, size_t size, | |||
249 | DO_STATS ( device_info->map_op_count++ ); | 249 | DO_STATS ( device_info->map_op_count++ ); |
250 | 250 | ||
251 | buf = alloc_safe_buffer(device_info, ptr, size, dir); | 251 | buf = alloc_safe_buffer(device_info, ptr, size, dir); |
252 | if (buf == 0) { | 252 | if (buf == NULL) { |
253 | dev_err(dev, "%s: unable to map unsafe buffer %p!\n", | 253 | dev_err(dev, "%s: unable to map unsafe buffer %p!\n", |
254 | __func__, ptr); | 254 | __func__, ptr); |
255 | return ~0; | 255 | return ~0; |