diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2016-09-17 08:21:30 +0200 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-09-26 23:06:16 +0530 |
commit | 2c7f2f20da9d3fe13ed08d1661ebc12d4ce0cab9 (patch) | |
tree | ab6e3420f3b442649bad69ddc93ea2f5c8d22661 /drivers | |
parent | cf80ecf7a277e7908264f822c721f93403cf518f (diff) | |
download | linux-stable-2c7f2f20da9d3fe13ed08d1661ebc12d4ce0cab9.tar.gz linux-stable-2c7f2f20da9d3fe13ed08d1661ebc12d4ce0cab9.tar.bz2 linux-stable-2c7f2f20da9d3fe13ed08d1661ebc12d4ce0cab9.zip |
ste_dma40: Return directly after a failed kmalloc_array()
Return directly after a memory allocation failed in this function
at the beginning.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/ste_dma40.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 156199d168bf..b4dd5910ffb1 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -3414,10 +3414,8 @@ static int __init d40_lcla_allocate(struct d40_base *base) page_list = kmalloc_array(MAX_LCLA_ALLOC_ATTEMPTS, sizeof(*page_list), GFP_KERNEL); - if (!page_list) { - ret = -ENOMEM; - goto failure; - } + if (!page_list) + return -ENOMEM; /* Calculating how many pages that are required */ base->lcla_pool.pages = SZ_1K * base->num_phy_chans / PAGE_SIZE; |