Skip to content

Commit 1080411

Browse files
linuswVinod Koul
authored andcommitted
dma: pl08x: allow zero slave channels
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>
1 parent 0e772c6 commit 1080411

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dma/amba-pl08x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2167,7 +2167,7 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id)
21672167
/* Register slave channels */
21682168
ret = pl08x_dma_init_virtual_channels(pl08x, &pl08x->slave,
21692169
pl08x->pd->num_slave_channels, true);
2170-
if (ret <= 0) {
2170+
if (ret < 0) {
21712171
dev_warn(&pl08x->adev->dev,
21722172
"%s failed to enumerate slave channels - %d\n",
21732173
__func__, ret);

0 commit comments

Comments
 (0)