Thread (21 messages) 21 messages, 6 authors, 2022-08-30

Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable

From: Mark Brown <broonie@kernel.org>
Date: 2022-08-16 11:54:49
Also in: dri-devel, linux-amlogic, linux-clk, linux-doc, linux-hwmon, linux-iio, lkml

On Tue, Aug 16, 2022 at 11:06:21AM +0000, Vaittinen, Matti wrote:
I wonder if writing such 'release callbacks' is compulsory? I mean, if I 
was writing a driver to some new (to me) subsystem and was required to 
write an explicit release-callback for a resource - then it'd surely 
rang a bell about potentially double freeing stuff with devm. Especially 
if the doc stated the callback can be called after the driver has been 
detached.
Generally yes, thoguh people can and do leave them blank and it's easy
enough to do some cleanup in there that assumes that the device is still
present and not think the device might've gone away especially if the
hardware isn't practically hotpluggable.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help