提交 9778e9a0 编写于 作者: J Jean Delvare 提交者: Takashi Iwai

ALSA: ASoC: Fix another cs4270 error path

Conversion to new-style i2c driver missed the error path of the
probe function. Fix it.
Signed-off-by: NJean Delvare <khali@linux-fr.org>
Cc: Timur Tabi <timur@freescale.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 ec2cd95f
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册