From: Taekki Kim Date: Tue, 20 Sep 2016 12:22:14 +0000 (+0900) Subject: [COMMON] samsung: exynos-dm: fix the mutex unlocking X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fe26bb848b1c647e293e45c104309304f840df75;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] samsung: exynos-dm: fix the mutex unlocking This patch fixes the mutex unlocking when return from error. Change-Id: I5c5e97446535432e5ff2a3503649fac216a2d851 Signed-off-by: Taekki Kim --- diff --git a/drivers/soc/samsung/exynos-dm.c b/drivers/soc/samsung/exynos-dm.c index dacd8fc2955d..6bcdf0ee0541 100644 --- a/drivers/soc/samsung/exynos-dm.c +++ b/drivers/soc/samsung/exynos-dm.c @@ -648,7 +648,7 @@ int policy_update_call_to_DM(enum exynos_dm_type dm_type, u32 min_freq, u32 max_ 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; @@ -660,7 +660,7 @@ int policy_update_call_to_DM(enum exynos_dm_type dm_type, u32 min_freq, u32 max_ 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 @@ -750,6 +750,7 @@ int DM_CALL(enum exynos_dm_type dm_type, unsigned long *target_freq) ret = dm_data_updater(dm_type); if (ret) { pr_err("Failed to update DM DATA!\n"); + mutex_unlock(&exynos_dm->lock); return -EAGAIN; }