linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Remove clientdata before kfree?
@ 2010-02-21 10:20 Wolfram Sang
       [not found] ` <20100221102034.GD25833-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Wolfram Sang @ 2010-02-21 10:20 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA; +Cc: Jean Delvare

[-- Attachment #1: Type: text/plain, Size: 744 bytes --]

Hi Jean,

I am teaching myself coccinelle at the moment and created a semantic patch
which detects missing 'i2c_set_clientdata(client, NULL)' before freeing the
used data-structure. There are a number of drivers missing that.

While doing this, it is also trivial to change a few drivers to FIRST use
i2c_set_clientdata() and THEN kfree (those few are doing it the other way
around). I think it is cleaner this way, but probably doesn't matter much in
reality. So, should I do this transformation or rather drop it (which is also
trivial ;)).

Kind regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

end of thread, other threads:[~2010-02-21 10:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-21 10:20 Remove clientdata before kfree? Wolfram Sang
     [not found] ` <20100221102034.GD25833-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-02-21 10:32   ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).