staging: iio: ad7746: Improve unlocking of a mutex in ad7746_start_calib()
authorMarkus Elfring <elfring@users.sourceforge.net>
Fri, 3 Nov 2017 08:26:28 +0000 (09:26 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 2 Dec 2017 10:40:07 +0000 (10:40 +0000)
commitaa6b707c146d4d19e87af0b995fab95bec5990a3
treeeab5ddb4494dfc154f107e24d70b92379f7076a9
parent71e083aaf716fffa91cf80e85e88f3c0674be81a
staging: iio: ad7746: Improve unlocking of a mutex in ad7746_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/ad7746.c