aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback/interface.c
diff options
context:
space:
mode:
authorXiubo Li <[email protected]>2014-09-24 06:30:29 +0000
committerMark Brown <[email protected]>2014-09-24 08:52:43 +0000
commitc7908a37aeee2a038d7b1492eae29750d8738d2e (patch)
treeabecdcc00c0e480427e0c0d1a680ce31df268220 /drivers/net/xen-netback/interface.c
parentspi: Only call transfer_one() if we have buffers to transfer (diff)
downloadkernel-c7908a37aeee2a038d7b1492eae29750d8738d2e.tar.gz
kernel-c7908a37aeee2a038d7b1492eae29750d8738d2e.zip
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/net/xen-netback/interface.c')
0 files changed, 0 insertions, 0 deletions