lkml.org 
[lkml]   [2013]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] regulator: anatop-regulator: Remove unneeded check
Date
From: Fabio Estevam <fabio.estevam@freescale.com>

At the 'anatop_probe_end' error path, the variable 'ret' is known to be
non-zero, so there is no need to check it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/regulator/anatop-regulator.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c
index c734d09..0a3597b 100644
--- a/drivers/regulator/anatop-regulator.c
+++ b/drivers/regulator/anatop-regulator.c
@@ -211,8 +211,7 @@ static int anatop_regulator_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, rdev);

anatop_probe_end:
- if (ret)
- kfree(sreg->name);
+ kfree(sreg->name);

return ret;
}
--
1.8.1.2


\
 
 \ /
  Last update: 2013-12-20 16:01    [W:0.070 / U:2.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site