aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-imx.c
diff options
context:
space:
mode:
authorXiubo Li <[email protected]>2014-08-18 09:08:44 +0000
committerThierry Reding <[email protected]>2014-08-25 12:38:12 +0000
commit533acc0e8df7d6553f11cf91c177211cb6037968 (patch)
tree812cd4e995141cfe2c1ce2533f52f4017d5af6b1 /drivers/pwm/pwm-imx.c
parentpwm: lpss: make it buildable only on X86 (diff)
downloadkernel-533acc0e8df7d6553f11cf91c177211cb6037968.tar.gz
kernel-533acc0e8df7d6553f11cf91c177211cb6037968.zip
pwm: Fix possible ZERO_SIZE_PTR pointer dereferencing error.
Since we cannot make sure the 'chip->npwm' 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 <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-imx.c')
0 files changed, 0 insertions, 0 deletions