From: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Subject: Remove clientdata before kfree?
Date: Sun, 21 Feb 2010 11:20:34 +0100 [thread overview]
Message-ID: <20100221102034.GD25833@pengutronix.de> (raw)
[-- 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 --]
next reply other threads:[~2010-02-21 10:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-21 10:20 Wolfram Sang [this message]
[not found] ` <20100221102034.GD25833-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-02-21 10:32 ` Remove clientdata before kfree? Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100221102034.GD25833@pengutronix.de \
--to=w.sang-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.