projects
/
wrapfs-5.3.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d5827c
)
powerpc/ps3: use dma_mapping_error()
author
Vincent Stehlé
<vincent.stehle@laposte.net>
Sun, 13 Dec 2020 18:26:22 +0000
(19:26 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Tue, 29 Dec 2020 12:47:02 +0000
(13:47 +0100)
[ Upstream commit
d0edaa28a1f7830997131cbce87b6c52472825d1
]
The DMA address returned by dma_map_single() should be checked with
dma_mapping_error(). Fix the ps3stor_setup() function accordingly.
Fixes: 80071802cb9c ("[POWERPC] PS3: Storage Driver Core")
Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link:
https://lore.kernel.org/r/20201213182622.23047-1-vincent.stehle@laposte.net
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/ps3/ps3stor_lib.c
patch
|
blob
|
history
diff --git
a/drivers/ps3/ps3stor_lib.c
b/drivers/ps3/ps3stor_lib.c
index 8c3f5adf1bc65378565406b8cb6567f5fd38e894..2d761837566263a9abb59fd2cbc42a6b818eec67 100644
(file)
--- a/
drivers/ps3/ps3stor_lib.c
+++ b/
drivers/ps3/ps3stor_lib.c
@@
-201,7
+201,7
@@
int ps3stor_setup(struct ps3_storage_device *dev, irq_handler_t handler)
dev->bounce_lpar = ps3_mm_phys_to_lpar(__pa(dev->bounce_buf));
dev->bounce_dma = dma_map_single(&dev->sbd.core, dev->bounce_buf,
dev->bounce_size, DMA_BIDIRECTIONAL);
- if (
!dev->bounce_dma
) {
+ if (
dma_mapping_error(&dev->sbd.core, dev->bounce_dma)
) {
dev_err(&dev->sbd.core, "%s:%u: map DMA region failed\n",
__func__, __LINE__);
error = -ENODEV;