This patch fixes the mutex unlocking when return from error.
Change-Id: I5c5e97446535432e5ff2a3503649fac216a2d851
Signed-off-by: Taekki Kim <taekki.kim@samsung.com>
if (ret) {
dev_err(exynos_dm->dev,
"acpm request channel is failed, id:%u, size:%u\n", ch_num, size);
- return -EINVAL;
+ goto out;
}
config.cmd = cmd;
config.response = true;
ret = acpm_ipc_send_data(ch_num, &config);
if (ret) {
dev_err(exynos_dm->dev, "Failed to send policy data to FVP");
- return -EINVAL;
+ goto out;
}
}
#endif
ret = dm_data_updater(dm_type);
if (ret) {
pr_err("Failed to update DM DATA!\n");
+ mutex_unlock(&exynos_dm->lock);
return -EAGAIN;
}