diff options
author | Tom Seewald <tseewald@gmail.com> | 2021-05-03 13:57:32 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-13 18:58:36 +0200 |
commit | dbc97bfd3918ed9268bfc174cae8a7d6b3d51aad (patch) | |
tree | 464cf371f300f2d8a58a4375e7fa2c515d750e89 /tools/perf/scripts/python | |
parent | 4fd798a5a89114c1892574c50f2aebd49bc5b4f5 (diff) |
net: liquidio: Add missing null pointer checks
The functions send_rx_ctrl_cmd() in both liquidio/lio_main.c and
liquidio/lio_vf_main.c do not check if the call to
octeon_alloc_soft_command() fails and returns a null pointer. Both
functions also return void so errors are not propagated back to the
caller.
Fix these issues by updating both instances of send_rx_ctrl_cmd() to
return an integer rather than void, and have them return -ENOMEM if an
allocation failure occurs. Also update all callers of send_rx_ctrl_cmd()
so that they now check the return value.
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Tom Seewald <tseewald@gmail.com>
Link: https://lore.kernel.org/r/20210503115736.2104747-66-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions