mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] regulator: anatop-regulator: Remove unneeded check
@ 2013-12-20 13:42 Fabio Estevam
  2013-12-20 13:42 ` [PATCH 2/2] regulator: anatop-regulator: Remove unneeded variable Fabio Estevam
  2013-12-21  7:49 ` [PATCH 1/2] regulator: anatop-regulator: Remove unneeded check Shawn Guo
  0 siblings, 2 replies; 5+ messages in thread
From: Fabio Estevam @ 2013-12-20 13:42 UTC (permalink / raw)
  To: broonie; +Cc: shawn.guo, b20788, linux-kernel, Fabio Estevam

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-12-21 15:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-20 13:42 [PATCH 1/2] regulator: anatop-regulator: Remove unneeded check Fabio Estevam
2013-12-20 13:42 ` [PATCH 2/2] regulator: anatop-regulator: Remove unneeded variable Fabio Estevam
2013-12-21  7:49 ` [PATCH 1/2] regulator: anatop-regulator: Remove unneeded check Shawn Guo
2013-12-21 14:25   ` Fabio Estevam
2013-12-21 15:54     ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome