staging: iio: ad7152: Improve unlocking of a mutex in ad7152_start_calib()
authorMarkus Elfring <elfring@users.sourceforge.net>
Fri, 3 Nov 2017 08:00:25 +0000 (09:00 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 2 Dec 2017 10:40:05 +0000 (10:40 +0000)
commit71e083aaf716fffa91cf80e85e88f3c0674be81a
tree8bba64f34b7c69aa9e5e6a4e1e7e269a8ecd8850
parent9ed2484598001cdfbc8f85d349ab6b1e8fc9ee1f
staging: iio: ad7152: Improve unlocking of a mutex in ad7152_start_calib()

* Add a jump target so that a call of the function "mutex_unlock" is stored
  only twice in this function implementation.

* Replace two calls by goto statements.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/cdc/ad7152.c