1
0
Fork 0

MLK-17447 drivers: soc: imx: Fix busfreq mutex unlock twice on imx8mq

A 'return' statement is missed before, So the mutex will be unlocked
twice, in some corner case, one core will unlock the mutex that locked
by anohter core wrongly. Then lead to concurrent access to the DVFS
at the same time.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 659615af4d35c7f118b7cf346624d423a3b15797)
5.4-rM2-2.2.x-imx-squashed
Bai Ping 2018-01-08 16:06:55 +08:00 committed by Dong Aisheng
parent ac3505d8ee
commit c74f346528
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2017 NXP
* Copyright 2017-2018 NXP
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -331,6 +331,7 @@ void release_bus_freq(enum bus_freq_mode mode)
(audio_bus_count == 0)) {
set_low_bus_freq();
mutex_unlock(&bus_freq_mutex);
return;
}
mutex_unlock(&bus_freq_mutex);