* [PATCH] power/ds2782: fix clientdata on removal
@ 2010-04-01 10:27 Wolfram Sang
[not found] ` <1270117664-29099-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2010-04-01 10:27 UTC (permalink / raw)
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Wolfram Sang, Ryan Mallon,
Hans Verkuil, Anton Vorontsov, Jean Delvare
Probably due to a copy & paste bug, clientdata was set again to the data
structure (which is freed immediately afterwards) when it should be
NULLed. Just remove the calls as the i2c-core does this automatically
now.
Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: Ryan Mallon <ryan-7Wk5F4Od5/oYd5yxfr4S2w@public.gmane.org>
Cc: Hans Verkuil <hverkuil-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
Cc: Anton Vorontsov <cbouatmailru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
---
Anton: If it is okay with you, I think this should go via the I2C-tree to
ensure it comes after the needed modification of the i2c-core.
drivers/power/ds2782_battery.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/drivers/power/ds2782_battery.c b/drivers/power/ds2782_battery.c
index da14f37..305d463 100644
--- a/drivers/power/ds2782_battery.c
+++ b/drivers/power/ds2782_battery.c
@@ -236,8 +236,6 @@ static int ds2782_battery_remove(struct i2c_client *client)
idr_remove(&battery_id, info->id);
mutex_unlock(&battery_lock);
- i2c_set_clientdata(client, info);
-
kfree(info);
return 0;
}
@@ -289,7 +287,6 @@ static int ds2782_battery_probe(struct i2c_client *client,
fail_register:
kfree(info->battery.name);
fail_name:
- i2c_set_clientdata(client, info);
kfree(info);
fail_info:
mutex_lock(&battery_lock);
--
1.7.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] power/ds2782: fix clientdata on removal
[not found] ` <1270117664-29099-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2010-04-01 10:40 ` Anton Vorontsov
[not found] ` <20100401104021.GA30121-wnGakbxT3iijyJ0x5qLZdcN33GVbZNy3@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Anton Vorontsov @ 2010-04-01 10:40 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Ryan Mallon, Hans Verkuil,
Jean Delvare
On Thu, Apr 01, 2010 at 12:27:44PM +0200, Wolfram Sang wrote:
> Probably due to a copy & paste bug, clientdata was set again to the data
> structure (which is freed immediately afterwards) when it should be
> NULLed. Just remove the calls as the i2c-core does this automatically
> now.
>
> Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> Cc: Ryan Mallon <ryan-7Wk5F4Od5/oYd5yxfr4S2w@public.gmane.org>
> Cc: Hans Verkuil <hverkuil-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
> Cc: Anton Vorontsov <cbouatmailru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> ---
>
> Anton: If it is okay with you, I think this should go via the I2C-tree to
> ensure it comes after the needed modification of the i2c-core.
Sure thing.
Acked-by: Anton Vorontsov <cbouatmailru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] power/ds2782: fix clientdata on removal
[not found] ` <20100401104021.GA30121-wnGakbxT3iijyJ0x5qLZdcN33GVbZNy3@public.gmane.org>
@ 2010-04-04 14:13 ` Wolfram Sang
[not found] ` <20100404141336.GA10176-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2010-04-04 14:13 UTC (permalink / raw)
To: Anton Vorontsov
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Ryan Mallon, Hans Verkuil,
Jean Delvare
[-- Attachment #1: Type: text/plain, Size: 1297 bytes --]
On Thu, Apr 01, 2010 at 02:40:21PM +0400, Anton Vorontsov wrote:
> On Thu, Apr 01, 2010 at 12:27:44PM +0200, Wolfram Sang wrote:
> > Probably due to a copy & paste bug, clientdata was set again to the data
> > structure (which is freed immediately afterwards) when it should be
> > NULLed. Just remove the calls as the i2c-core does this automatically
> > now.
> >
> > Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> > Cc: Ryan Mallon <ryan-7Wk5F4Od5/oYd5yxfr4S2w@public.gmane.org>
> > Cc: Hans Verkuil <hverkuil-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
> > Cc: Anton Vorontsov <cbouatmailru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > Cc: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> > ---
> >
> > Anton: If it is okay with you, I think this should go via the I2C-tree to
> > ensure it comes after the needed modification of the i2c-core.
>
> Sure thing.
>
> Acked-by: Anton Vorontsov <cbouatmailru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Sorry, I misunderstood Jean. Would be nice if you could pick it up. Sorry for
the noise.
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] 4+ messages in thread
* Re: [PATCH] power/ds2782: fix clientdata on removal
[not found] ` <20100404141336.GA10176-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2010-04-06 16:50 ` Anton Vorontsov
0 siblings, 0 replies; 4+ messages in thread
From: Anton Vorontsov @ 2010-04-06 16:50 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Ryan Mallon, Hans Verkuil,
Jean Delvare
On Sun, Apr 04, 2010 at 04:13:36PM +0200, Wolfram Sang wrote:
> On Thu, Apr 01, 2010 at 02:40:21PM +0400, Anton Vorontsov wrote:
> > On Thu, Apr 01, 2010 at 12:27:44PM +0200, Wolfram Sang wrote:
> > > Probably due to a copy & paste bug, clientdata was set again to the data
> > > structure (which is freed immediately afterwards) when it should be
> > > NULLed. Just remove the calls as the i2c-core does this automatically
> > > now.
> > >
> > > Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> > > Cc: Ryan Mallon <ryan-7Wk5F4Od5/oYd5yxfr4S2w@public.gmane.org>
> > > Cc: Hans Verkuil <hverkuil-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
> > > Cc: Anton Vorontsov <cbouatmailru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > > Cc: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
> > > ---
> > >
> > > Anton: If it is okay with you, I think this should go via the I2C-tree to
> > > ensure it comes after the needed modification of the i2c-core.
> >
> > Sure thing.
> >
> > Acked-by: Anton Vorontsov <cbouatmailru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>
> Sorry, I misunderstood Jean. Would be nice if you could pick it up. Sorry for
> the noise.
Applied.
Thanks!
--
Anton Vorontsov
email: cbouatmailru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
irc://irc.freenode.net/bd2
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-04-06 16:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-01 10:27 [PATCH] power/ds2782: fix clientdata on removal Wolfram Sang
[not found] ` <1270117664-29099-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-04-01 10:40 ` Anton Vorontsov
[not found] ` <20100401104021.GA30121-wnGakbxT3iijyJ0x5qLZdcN33GVbZNy3@public.gmane.org>
2010-04-04 14:13 ` Wolfram Sang
[not found] ` <20100404141336.GA10176-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-04-06 16:50 ` Anton Vorontsov
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).