diff options
-rw-r--r-- | drivers/dma/ste_dma40.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index f25c9ccf28e8..7ccb8e2d59be 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c | |||
@@ -3286,17 +3286,11 @@ static struct d40_base * __init d40_hw_detect_init(struct platform_device *pdev) | |||
3286 | if (!base->lookup_phy_chans) | 3286 | if (!base->lookup_phy_chans) |
3287 | goto failure; | 3287 | goto failure; |
3288 | 3288 | ||
3289 | if (num_log_chans + ARRAY_SIZE(dma40_memcpy_channels)) { | 3289 | base->lookup_log_chans = kzalloc(num_log_chans * |
3290 | /* | 3290 | sizeof(struct d40_chan *), |
3291 | * The max number of logical channels are event lines for all | 3291 | GFP_KERNEL); |
3292 | * src devices and dst devices | 3292 | if (!base->lookup_log_chans) |
3293 | */ | 3293 | goto failure; |
3294 | base->lookup_log_chans = kzalloc(num_log_chans * | ||
3295 | sizeof(struct d40_chan *), | ||
3296 | GFP_KERNEL); | ||
3297 | if (!base->lookup_log_chans) | ||
3298 | goto failure; | ||
3299 | } | ||
3300 | 3294 | ||
3301 | base->reg_val_backup_chan = kmalloc(base->num_phy_chans * | 3295 | base->reg_val_backup_chan = kmalloc(base->num_phy_chans * |
3302 | sizeof(d40_backup_regs_chan), | 3296 | sizeof(d40_backup_regs_chan), |