diff options
author | 2014-05-19 15:13:45 +0800 | |
---|---|---|
committer | 2014-05-26 16:37:04 +0100 | |
commit | e12892070184ee782c207f09722a93d0236be955 (patch) | |
tree | 5fc0bb3d0295ad51878c6e5b05b54df92c88c026 /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | Linux 3.15-rc1 (diff) | |
download | linux-dev-e12892070184ee782c207f09722a93d0236be955.tar.xz linux-dev-e12892070184ee782c207f09722a93d0236be955.zip |
regmap: irq: Fix possible ZERO_SIZE_PTR pointer dereferencing error.
Since we cannot make sure the 'chip->num_regs' will always be none zero
from the users, and then if 'chip->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 checking the 'chip->num_regs' before
calling kzalloc().
This also sorts the header files in alphabetical order at the same time.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions