diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-09-09 07:04:45 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-09-12 04:35:47 -0400 |
commit | 5758960353d179f0541226764a1e47eff01666ff (patch) | |
tree | 16c28d6e3887e5e2b3a8c494643ccd2d90a7c25b /sound/aoa/codecs | |
parent | 89f3325a6e3002f33bc5e0412d35fc097e219dbd (diff) |
ALSA: aoa: Remove obsolete cleanup for clientdata
The i2c core will clear the clientdata pointer automatically.
We don't have to set the `data' field to NULL in remove() or
if probe() failed anymore.
Also remove a unneeded NULL checking for kfree.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/aoa/codecs')
-rw-r--r-- | sound/aoa/codecs/onyx.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/aoa/codecs/onyx.c b/sound/aoa/codecs/onyx.c index 3687a6cc9881..762af68c8996 100644 --- a/sound/aoa/codecs/onyx.c +++ b/sound/aoa/codecs/onyx.c | |||
@@ -1067,7 +1067,6 @@ static int onyx_i2c_probe(struct i2c_client *client, | |||
1067 | printk(KERN_DEBUG PFX "created and attached onyx instance\n"); | 1067 | printk(KERN_DEBUG PFX "created and attached onyx instance\n"); |
1068 | return 0; | 1068 | return 0; |
1069 | fail: | 1069 | fail: |
1070 | i2c_set_clientdata(client, NULL); | ||
1071 | kfree(onyx); | 1070 | kfree(onyx); |
1072 | return -ENODEV; | 1071 | return -ENODEV; |
1073 | } | 1072 | } |
@@ -1112,8 +1111,7 @@ static int onyx_i2c_remove(struct i2c_client *client) | |||
1112 | 1111 | ||
1113 | aoa_codec_unregister(&onyx->codec); | 1112 | aoa_codec_unregister(&onyx->codec); |
1114 | of_node_put(onyx->codec.node); | 1113 | of_node_put(onyx->codec.node); |
1115 | if (onyx->codec_info) | 1114 | kfree(onyx->codec_info); |
1116 | kfree(onyx->codec_info); | ||
1117 | kfree(onyx); | 1115 | kfree(onyx); |
1118 | return 0; | 1116 | return 0; |
1119 | } | 1117 | } |