diff --git a/drivers/dma/ti/edma.c b/drivers/dma/ti/edma.c index 0628ee4bf1b41..03a7f647f7b2c 100644 --- a/drivers/dma/ti/edma.c +++ b/drivers/dma/ti/edma.c @@ -2342,8 +2342,10 @@ static int edma_probe(struct platform_device *pdev) ecc->channels_mask = devm_kcalloc(dev, BITS_TO_LONGS(ecc->num_channels), sizeof(unsigned long), GFP_KERNEL); - if (!ecc->slave_chans || !ecc->slot_inuse || !ecc->channels_mask) + if (!ecc->slave_chans || !ecc->slot_inuse || !ecc->channels_mask) { + ret = -ENOMEM; goto err_disable_pm; + } /* Mark all channels available initially */ bitmap_fill(ecc->channels_mask, ecc->num_channels);