linux/drivers/net/ethernet/cavium
Tom Seewald dbc97bfd39 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>
2021-05-13 18:58:36 +02:00
..
common net: cavium: Fix a bunch of kerneldoc parameter issues 2020-09-09 14:11:58 -07:00
liquidio net: liquidio: Add missing null pointer checks 2021-05-13 18:58:36 +02:00
octeon of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
thunder of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00