lkml.org 
[lkml]   [2013]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drivers: mfd: tps65912: Convert to use devm_kzalloc
> > There is no need to call kfree while using devm_kzalloc,
> > remove it from *_device_init function.
> >
> > Signed-off-by: Leon Romanovsky <leon@leon.nu>
> > ---
> > drivers/mfd/tps65912-core.c | 5 ++---
> > 1 file changed, 2 insertions(+), 3 deletions(-)
>
> To be honest the whole tps65912 looks strange to me.
> For example, kfree(tps65912) calls all over the code.
>
> tps65912_i2c_probe allocates tps65912 struct, but tps65912_device_exit
> releases it.

Yes, this is expected.

tps65912_[spi|i2c]_remove() both call tps65912_device_exit() which in
turn frees tps65912. Saves duplicating code.

I'll clean thinks up a little, so this is less confusing.

--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2013-05-23 11:01    [W:0.067 / U:1.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site