regmap: make sure we unlock on failure in regmap_bulk_write
authorCourtney Cavin <courtney.cavin@sonymobile.com>
Wed, 20 Nov 2013 23:27:09 +0000 (15:27 -0800)
committerMark Brown <broonie@linaro.org>
Thu, 21 Nov 2013 14:05:31 +0000 (14:05 +0000)
Signed-off-by: Courtney Cavin <courtney.cavin@sonymobile.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/base/regmap/regmap.c

index 9c021d9..d1a9141 100644 (file)
@@ -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);