Re: probe fail, what with devm_kzalloc, kcalloc data?

2020-04-03 Thread Greg KH
On Fri, Apr 03, 2020 at 02:47:50PM +0200, Tomek The Messenger wrote: > Hi > What happens with devm_kzalloc and devm_kcalloc data when probe function > returns not 0? > Is this memory automatically deallocated? Yes. Try it and see :) greg k-h ___

probe fail, what with devm_kzalloc, kcalloc data?

2020-04-03 Thread Tomek The Messenger
Hi What happens with devm_kzalloc and devm_kcalloc data when probe function returns not 0? Is this memory automatically deallocated? Example below: static struct my_data* my_static_pointer; static int somedriver_do_probe(struct platform_device *pdev) { int ret; struct device *dev = >dev;

Re: how to check regmap start address

2020-04-03 Thread Tomek The Messenger
ok, for me strange was this ranges[0] declaration. I found other way to get to know mmio regmap size, just to remember pointer to struct resource* in private data in probe when parsing from device tree reg= On Thu, Apr 2, 2020 at 2:15 PM Greg KH wrote: > On Thu, Apr 02, 2020 at 01:48:23PM