On Fri, Dec 20, 2013 at 11:42:09AM -0200, Fabio Estevam wrote: > From: Fabio Estevam <fabio.este...@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.este...@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);
NAK With the change, a successful probe will end up with calling this kfree() as well. Shawn > > return ret; > } > -- > 1.8.1.2 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/