[lkml]   [2019]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] iio: cros_ec_accel_legacy: Always release lock when returning from _read()

On Mon, Jul 15, 2019 at 12:10 PM Matthias Kaehlcke <> wrote:
> Before doing any actual work cros_ec_accel_legacy_read() acquires
> a mutex, which is released at the end of the function. However for
> 'calibbias' channels the function returns directly, without releasing
> the lock. The next attempt to acquire the lock blocks forever. Instead
> of an explicit return statement use the common return path, which
> releases the lock.
> Fixes: 11b86c7004ef1 ("platform/chrome: Add cros_ec_accel_legacy driver")
> Signed-off-by: Matthias Kaehlcke <>
> ---
> drivers/iio/accel/cros_ec_accel_legacy.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)

See also <>

Actually, the "Fixes" tag is wrong here, though. The problem only
exists because we have <> in our tree, AKA
("FROMLIST: iio: cros_ec : Extend legacy support to ARM device").
Before that there was no mutex. For upstream purposes this could
probably be squashed into the original patch.


 \ /
  Last update: 2019-07-15 21:41    [W:0.052 / U:3.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site