aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ste_dma40.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2016-09-17 08:24:46 +0200
committerVinod Koul <vinod.koul@intel.com>2016-09-26 23:06:16 +0530
commitabac5bac829cc9d8cf178344b4f34b2264927672 (patch)
tree0f84590fdc5bafc8afa05e762e792ec1e37895eb /drivers/dma/ste_dma40.c
parentste_dma40: Rename a jump label in d40_lcla_allocate() (diff)
downloadlinux-dev-abac5bac829cc9d8cf178344b4f34b2264927672.tar.xz
linux-dev-abac5bac829cc9d8cf178344b4f34b2264927672.zip
ste_dma40: Move an assignment in d40_lcla_allocate()
Move one assignment for the local variable "ret" so that its setting will only be performed after corresponding data processing succeeded by this function. 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/dma/ste_dma40.c')
-rw-r--r--drivers/dma/ste_dma40.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 6f198a31e619..47acb61cb15a 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -3404,7 +3404,7 @@ static int __init d40_lcla_allocate(struct d40_base *base)
struct d40_lcla_pool *pool = &base->lcla_pool;
unsigned long *page_list;
int i, j;
- int ret = 0;
+ int ret;
/*
* This is somewhat ugly. We need 8192 bytes that are 18 bit aligned,
@@ -3476,6 +3476,7 @@ static int __init d40_lcla_allocate(struct d40_base *base)
writel(virt_to_phys(base->lcla_pool.base),
base->virtbase + D40_DREG_LCLA);
+ ret = 0;
free_page_list:
kfree(page_list);
return ret;