diff options
author | 2016-11-29 20:56:10 +0800 | |
---|---|---|
committer | 2016-11-29 17:36:43 +0100 | |
commit | 7faf44bf925531478f5862002d6291893a3b9ba3 (patch) | |
tree | ad3fbeb2d810c45669076905b1cd4895739ce883 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | usb: return correct errno on failures (diff) | |
download | wireguard-linux-7faf44bf925531478f5862002d6291893a3b9ba3.tar.xz wireguard-linux-7faf44bf925531478f5862002d6291893a3b9ba3.zip |
usb: fix improper return value when kzalloc fails
The comment says function wa_nep_queue() should return 0 if ok, and <0
errno code on error. However, its implementation always returns 0, even
if the call to kzalloc() fails. As a result, the return value may be
inconsistent with the execution status, which may mislead the callers.
This patch fixes the bug, returning -ENOMEM when the call to kzalloc()
fails.
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions