diff options
| author | Alexander Kolesnikov <akolesni@codeaurora.org> | 2017-05-18 15:42:06 +0300 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-05-18 06:00:55 -0700 |
| commit | 5c4431b6048995d1604513fe86e7ac3cda9061ab (patch) | |
| tree | 133f07dadffa2f82ba7dbb28d86af6e44f1fdb36 | |
| parent | 5404e35069576a8cd8203065f60975e34a5f727b (diff) | |
msm: camera: Fix a deadlock in power-up sequence of the I2C-TZ relay
Invoke msm_camera_tz_unlock() before calling the
msm_camera_tz_unload_ta() to avoid a deadlock.
CRs-Fixed: 2040684
Change-Id: I1765e47abba5e84ef4c90f3346fb326dc6f84671
Signed-off-by: Alexander Kolesnikov <akolesni@codeaurora.org>
| -rw-r--r-- | drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_tz_i2c.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_tz_i2c.c b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_tz_i2c.c index b3e5dc7f9cb8..c5cdee1bf706 100644 --- a/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_tz_i2c.c +++ b/drivers/media/platform/msm/camera_v2/sensor/io/msm_camera_tz_i2c.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2016, 2017 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -520,14 +520,16 @@ int32_t msm_camera_tz_i2c_power_up( msm_camera_tz_get_ta_handle(), sensor_id, &sensor_secure); - if (!rc && sensor_secure) + if (!rc && sensor_secure) { /* Sensor validated by TA*/ sensor_info[sensor_id].ready++; + msm_camera_tz_unlock(); + } else { + msm_camera_tz_unlock(); msm_camera_tz_unload_ta(); rc = -EFAULT; } - msm_camera_tz_unlock(); } } else rc = -EFAULT; |
