dma: pl08x: allow zero slave channels
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 13 Dec 2013 23:16:23 +0000 (00:16 +0100)
committerVinod Koul <vinod.koul@intel.com>
Wed, 18 Dec 2013 16:28:30 +0000 (21:58 +0530)
It might happen that a platform wants to use its DMA engine for
memcpy only, and then we have zero slave channels to initialize,
so allow the slave initialization to return zero.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/amba-pl08x.c

index ec4ee5c..f68f1c1 100644 (file)
@@ -2167,7 +2167,7 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id)
        /* Register slave channels */
        ret = pl08x_dma_init_virtual_channels(pl08x, &pl08x->slave,
                        pl08x->pd->num_slave_channels, true);
-       if (ret <= 0) {
+       if (ret < 0) {
                dev_warn(&pl08x->adev->dev,
                        "%s failed to enumerate slave channels - %d\n",
                                __func__, ret);