diff options
author | Zhang Yanfei <zhangyanfei@cn.fujitsu.com> | 2013-03-14 01:16:25 +0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2013-03-14 09:36:51 +0100 |
commit | 5db7ba5dbc87daf361397ac727f146e0565db1a9 (patch) | |
tree | 24f1eed59f04d881aa04de8cb4d10aa5adb51138 /kexec/arch/sh/kexec-netbsd-sh.c | |
parent | 51438a32f6a0f09a358742f06196d14e4ad0ccab (diff) |
kexec: check size before trying the malloc
If size is zero, it is unnecessary to do the malloc operation.
So checking size first is better than doing malloc first.
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/sh/kexec-netbsd-sh.c')
0 files changed, 0 insertions, 0 deletions