mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
dmaengine: ti: edma: Fix error return code in edma_probe()
Fix to return negative error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: 2a03c13145
("dmaengine: ti: edma: add missed operations")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20191212114622.127322-1-weiyongjun1@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
a5b982af95
commit
d1fd03a35e
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue