Merge branches 'doc.2021.01.06a', 'fixes.2021.01.04b', 'kfree_rcu.2021.01.04a', ...
[linux-2.6-microblaze.git] / drivers / ps3 / ps3stor_lib.c
index 333ba83..a12a1ad 100644 (file)
@@ -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;