if (module_state == GBAUDIO_CODEC_SHUTDOWN) {
dev_dbg(codec->dev, "%s: module already configured\n",
module->name);
- goto func_exit;
+ mutex_unlock(&codec->lock);
+ return 0;
}
/* find the dai */
if (!data) {
dev_err(codec->dev, "%s:%s DATA connection missing\n",
dai_name, module->name);
- ret = -ENODEV;
- goto func_exit;
+ mutex_unlock(&codec->lock);
+ return -ENODEV;
}
if (codec_state > GBAUDIO_CODEC_HWPARAMS) {
data_cport = data->connection->intf_cport_id;
if (module_state == codec_state) {
dev_dbg(codec->dev, "%s: module already configured\n",
module->name);
- goto func_exit;
+ mutex_unlock(&codec->lock);
+ return 0;
}
/* find the dai */
if (!data) {
dev_err(codec->dev, "%s:%s DATA connection missing\n",
dai_name, module->name);
- ret = -ENODEV;
- goto func_exit;
+ mutex_unlock(&codec->lock);
+ return -ENODEV;
}
/* register cport */
if (!data) {
dev_err(dai->dev, "%s:%s DATA connection missing\n",
dai->name, module->name);
- ret = -ENODEV;
- goto func_exit;
+ mutex_unlock(&codec->lock);
+ return -ENODEV;
}
if (!mute && !stream) {/* start playback */
module->name, mute ? "Mute" : "Unmute",
stream ? "Capture" : "Playback", ret);
-func_exit:
mutex_unlock(&codec->lock);
- return 0;
+ return ret;
}
static struct snd_soc_dai_ops gbcodec_dai_ops = {