Skip to content

Commit

Permalink
ARM: dmabounce: fix map_single() error return value
Browse files Browse the repository at this point in the history
When map_single() is unable to obtain a safe buffer, we must return
the dma_addr_t error value, which is ~0 rather than 0.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Jul 3, 2011
1 parent ca56a95 commit 1787836
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/common/dmabounce.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ static inline dma_addr_t map_single(struct device *dev, void *ptr, size_t size,
if (buf == 0) {
dev_err(dev, "%s: unable to map unsafe buffer %p!\n",
__func__, ptr);
return 0;
return ~0;
}

dev_dbg(dev,
Expand Down

0 comments on commit 1787836

Please sign in to comment.