android_kernel_google_msm/drivers/base/regmap
Xiubo Li 65b412cc67 regmap: fix possible ZERO_SIZE_PTR pointer dereferencing error.
commit d6b41cb060 upstream.

Since we cannot make sure the 'val_count' will always be none zero
here, and then if it equals to zero, the kmemdup() will return
ZERO_SIZE_PTR, which equals to ((void *)16).

So this patch fix this with just doing the zero check before calling
kmemdup().

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
[lizf: Backported to 3.4: release mutex before returning EINVAL]
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-02-02 17:04:44 +08:00
..
internal.h
Kconfig
Makefile
regcache-lzo.c The following text was taken from the original review request: 2012-03-24 10:41:37 -07:00
regcache-rbtree.c regmap: cache Fix regcache-rbtree sync 2013-04-12 09:38:43 -07:00
regcache.c regmap: Export regcache_sync_region() 2012-04-03 13:08:53 +01:00
regmap-debugfs.c regmap: debugfs: fix possbile NULL pointer dereference 2015-02-02 17:04:44 +08:00
regmap-i2c.c
regmap-irq.c
regmap-spi.c
regmap.c regmap: fix possible ZERO_SIZE_PTR pointer dereferencing error. 2015-02-02 17:04:44 +08:00