linux-stable/drivers/base/regmap
Krzysztof Kozlowski 72a6a5df2c regmap: irq: Set data pointer only on regmap_add_irq_chip success
After setting the 'data' pointer (wchich is returned to the caller for
freeing later) the regmap_add_irq_chip() could still fail for various
reasons (ENOMEM, regmap_read or regmap_write failure). In such case the
memory under 'data' was freed in error path and error value was returned
but the 'data' variable was not changed.

This could lead to errors if the caller passed such 'data' to
regmap_del_irq_chip().

The 'data' pointer should be changed atomically from the caller
perspective - set it only on regmap_add_irq_chip() success.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-13 21:47:36 +00:00
..
internal.h Merge remote-tracking branch 'regmap/topic/field' into regmap-next 2013-10-28 13:01:33 -07:00
Kconfig regmap: add SPMI support 2013-10-28 12:51:43 -07:00
Makefile regmap: add SPMI support 2013-10-28 12:51:43 -07:00
regcache-flat.c regmap: flat: Add flat cache type 2013-01-02 10:58:53 +00:00
regcache-lzo.c regmap: cache: Pass the map rather than the word size when updating values 2013-03-04 10:30:27 +08:00
regcache-rbtree.c regmap: Updates for v3.12 2013-09-03 10:07:40 -07:00
regcache.c regmap: Use async I/O during cache sync 2013-10-10 21:15:23 +01:00
regmap-debugfs.c regmap: debugfs: Fix a boot time crash with early regmap init 2013-10-24 13:50:58 +01:00
regmap-i2c.c i2c: Split I2C_M_NOSTART support out of I2C_FUNC_PROTOCOL_MANGLING 2012-05-30 10:55:34 +02:00
regmap-irq.c regmap: irq: Set data pointer only on regmap_add_irq_chip success 2014-03-13 21:47:36 +00:00
regmap-mmio.c regmap: use IS_ERR() to check clk_get() results 2013-11-26 13:16:31 +00:00
regmap-spi.c regmap: spi: Handle async writes of only one buffer 2013-10-14 22:09:26 +01:00
regmap-spmi.c regmap: add SPMI support 2013-10-28 12:51:43 -07:00
regmap.c regmap: Allow regmap_bulk_write() to work for "no-bus" regmaps 2013-12-30 12:39:20 +00:00