Skip to content

Commit

Permalink
ALSA: ASoC: Fix another cs4270 error path
Browse files Browse the repository at this point in the history
Conversion to new-style i2c driver missed the error path of the
probe function. Fix it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Timur Tabi <timur@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Jean Delvare authored and Takashi Iwai committed Sep 29, 2008
1 parent ec2cd95 commit 9778e9a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions sound/soc/codecs/cs4270.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,17 +610,12 @@ static int cs4270_i2c_probe(struct i2c_client *i2c_client,
return 0;

error:
if (codec->control_data) {
i2c_detach_client(i2c_client);
codec->control_data = NULL;
}
codec->control_data = NULL;

kfree(codec->reg_cache);
codec->reg_cache = NULL;
codec->reg_cache_size = 0;

kfree(i2c_client);

return ret;
}

Expand Down

0 comments on commit 9778e9a

Please sign in to comment.