projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e2f521e
)
ARM: dmabounce: check pointer against NULL not 0
author
Russell King
<rmk+kernel@arm.linux.org.uk>
Sun, 3 Jul 2011 22:54:34 +0000
(23:54 +0100)
committer
Russell King
<rmk+kernel@arm.linux.org.uk>
Sun, 3 Jul 2011 22:54:34 +0000
(23:54 +0100)
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>
arch/arm/common/dmabounce.c
patch
|
blob
|
history
diff --git
a/arch/arm/common/dmabounce.c
b/arch/arm/common/dmabounce.c
index 0077c1b7d7ffa13825fc2fe1ab674bbb816a2bcb..b4a8759e0fa4213576ebabf633dbd2329d33dd14 100644
(file)
--- 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,
DO_STATS ( device_info->map_op_count++ );
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",
__func__, ptr);
return ~0;