author: Vincent Stehlé <vincent.stehle@laposte.net> 2020-12-13 19:26:22 +0100
committer: Michael Ellerman <mpe@ellerman.id.au> 2020-12-15 22:50:12 +1100
commit: d0edaa28a1f7830997131cbce87b6c52472825d1
parent: 328e7e487a464aad024fbde6663b7859df082b7b
Commit Summary:
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/drivers/ps3/ps3stor_lib.c b/drivers/ps3/ps3stor_lib.c
index 333ba83006e4..a12a1ad9b5fe 100644
--- a/drivers/ps3/ps3stor_lib.c
+++ b/drivers/ps3/ps3stor_lib.c
@@ -189,7 +189,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;