summaryrefslogtreecommitdiff
path: root/drivers/input/mouse/psmouse-base.c
diff options
context:
space:
mode:
authorXiubo Li <Li.Xiubo@freescale.com>2014-09-24 10:30:29 +0400
committerMark Brown <broonie@kernel.org>2014-09-24 12:52:43 +0400
commitc7908a37aeee2a038d7b1492eae29750d8738d2e (patch)
treeabecdcc00c0e480427e0c0d1a680ce31df268220 /drivers/input/mouse/psmouse-base.c
parent38ec10f60d9ca3a7eb3a5b52500a67479296b86f (diff)
downloadlinux-c7908a37aeee2a038d7b1492eae29750d8738d2e.tar.xz
spi: Fix possible ZERO_SIZE_PTR pointer dereferencing error.
Since we cannot make sure the 'n' will always be none zero here, and then if either equal to zero, the kzalloc() will return ZERO_SIZE_PTR, which equals to ((void *)16). So this patch fix this with just doing the zero check before calling kzalloc(). Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/input/mouse/psmouse-base.c')
0 files changed, 0 insertions, 0 deletions