mfd: Return an error on failed wm831x register writes
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 5 Dec 2011 12:01:07 +0000 (12:01 +0000)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 8 Jan 2012 23:37:40 +0000 (00:37 +0100)
Got dropped in the regmap conversion.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/wm831x-core.c

index 3b761893f9ba29bbbedeb3d6eaee538593d1f11a..f5e54fae8ada924bb029a1afe9a0239f3eb959b3 100644 (file)
@@ -559,6 +559,8 @@ static int wm831x_write(struct wm831x *wm831x, unsigned short reg,
                dev_vdbg(wm831x->dev, "Write %04x to R%d(0x%x)\n",
                         buf[i], reg + i, reg + i);
                ret = regmap_write(wm831x->regmap, reg + i, buf[i]);
+               if (ret != 0)
+                       return ret;
        }
 
        return 0;