diff options
| author | Amitoj Kaur Chawla <[email protected]> | 2016-02-07 10:56:25 +0530 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2016-02-11 09:43:25 -0500 |
| commit | 6d9b6f424d0806e2a7f3e7f0a74170ec3ad30443 (patch) | |
| tree | 956d44bbd4de64d416c98df2bc33a8b536ed8aa9 /tools/perf/scripts/python/failed-syscalls-by-pid.py | |
| parent | e7e9956d8fc3c92e797e7334f2aee31dd9c623f3 (diff) | |
bonding: Return correct error code
The return value of kzalloc on failure of allocation of memory should
be -ENOMEM and not -1.
Found using Coccinelle. A simplified version of the semantic patch
used is:
//<smpl>
@@
expression *e;
@@
e = kzalloc(...);
if (e == NULL) {
...
return
- -1
+ -ENOMEM
;
}
//</smpl>
The single call site only checks that the return value is not 0,
hence no change is required at the call site.
Signed-off-by: Amitoj Kaur Chawla <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/failed-syscalls-by-pid.py')
0 files changed, 0 insertions, 0 deletions