Skip to content

Commit

Permalink
dma: pl08x: allow zero slave channels
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Linus Walleij authored and Vinod Koul committed Dec 18, 2013
1 parent 0e772c6 commit 1080411
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/amba-pl08x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1080411

Please sign in to comment.