linux_dsm_epyc7002/drivers/base/regmap
Xiubo Li f5727cd312 regmap: Fix possible ZERO_SIZE_PTR pointer dereferencing error.
Since we cannot make sure the 'len = pair_size * num_regs' will always
be none zero from the users, and then if 'num_regs' equals to zero by
mistake or other reasons, the kzalloc() will return ZERO_SIZE_PTR, which
equals to ((void *)16).

So this patch fix this with just doing the 'len' zero check before calling
kzalloc().

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-30 20:33:57 -07:00
..
internal.h regmap: Implementation for regmap_multi_reg_write 2014-03-10 17:09:32 +00: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 Merge remote-tracking branches 'regmap/topic/cache', 'regmap/topic/irq', 'regmap/topic/lock', 'regmap/topic/mmio', 'regmap/topic/nodev', 'regmap/topic/parse-val' and 'regmap/topic/patch' into regmap-next 2014-03-28 11:50:43 +00:00
regmap-debugfs.c regmap: debugfs: "registers" & "access" for single register maps 2014-02-03 12:16:24 +00:00
regmap-i2c.c drivers/base: delete non-required instances of include <linux/init.h> 2014-02-14 14:31:37 -08: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 Driver core / sysfs patches for 3.15-rc1 2014-04-01 16:28:19 -07:00
regmap-spi.c drivers/base: delete non-required instances of include <linux/init.h> 2014-02-14 14:31:37 -08:00
regmap-spmi.c regmap: spmi: support base and extended register spaces 2014-02-15 11:55:28 -08:00
regmap.c regmap: Fix possible ZERO_SIZE_PTR pointer dereferencing error. 2014-04-30 20:33:57 -07:00