From: Courtney Cavin Date: Wed, 20 Nov 2013 23:27:09 +0000 (-0800) Subject: regmap: make sure we unlock on failure in regmap_bulk_write X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=73f080fde50de1be7ab1e62fd93287edaf0861db;p=linux-beck.git regmap: make sure we unlock on failure in regmap_bulk_write Signed-off-by: Courtney Cavin Signed-off-by: Mark Brown --- diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 9c021d9cace0..d1a914116f66 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -1549,7 +1549,7 @@ int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val, val + (i * val_bytes), val_bytes); if (ret != 0) - return ret; + goto out; } } else { ret = _regmap_raw_write(map, reg, wval, val_bytes * val_count);