Skip to contentSkip to conversation

ALSA: aoa: Remove wrong i2c_set_clientdata in onyx_i2c_remove()

PATCH Applied Axel Lin 2 participants 2 messages Dec 10, 2010

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ALSA: aoa: Remove wrong i2c_set_clientdata in onyx_i2c_remove()

It does not make sense to set clientdata to onyx in onyx_i2c_remove() as we are going to kfree onyx.
What we really want here is i2c_set_clientdata(client, NULL); Since the i2c core will take care of it now, so this patch just removes it.

---
 sound/aoa/codecs/onyx.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
sound/aoa/codecs/onyx.c +0 -1
index 91852e4..3687a6c 100644
@@ -1114,7 +1114,6 @@ static int onyx_i2c_remove(struct i2c_client *client)
 	of_node_put(onyx->codec.node);
 	if (onyx->codec_info)
 		kfree(onyx->codec_info);
-	i2c_set_clientdata(client, onyx);
 	kfree(onyx);
 	return 0;
 }
Signature · 1 line
1.7.2
Applied
#1 lore raw

At Fri, 10 Dec 2010 17:34:26 +0800,

Quoted 7 lines · Axel Lin

It does not make sense to set clientdata to onyx in onyx_i2c_remove() as we are going to kfree onyx.
What we really want here is i2c_set_clientdata(client, NULL); Since the i2c core will take care of it now, so this patch just removes it.

Thanks, applied now.

Takashi

Quoted 21 lines
---
 sound/aoa/codecs/onyx.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
sound/aoa/codecs/onyx.c +0 -1
index 91852e4..3687a6c 100644
@@ -1114,7 +1114,6 @@ static int onyx_i2c_remove(struct i2c_client *client)
 	of_node_put(onyx->codec.node);
 	if (onyx->codec_info)
 		kfree(onyx->codec_info);
-	i2c_set_clientdata(client, onyx);
 	kfree(onyx);
 	return 0;
 }
Signature · 1 line
1.7.2