diff options
author | Justin Tee <[email protected]> | 2023-02-27 20:43:36 -0800 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2023-03-06 18:33:12 -0500 |
commit | 312320b0e0ec21249a17645683fe5304d796aec1 (patch) | |
tree | dbe7bbe2863dfd69c539fdf767550e45ef54f80c /tools/testing/selftests/bpf/progs/test_autoload.c | |
parent | c9507eab9fa7af7ab4c80856eeafd1481ff16f7c (diff) |
scsi: lpfc: Check kzalloc() in lpfc_sli4_cgn_params_read()
If kzalloc() fails in lpfc_sli4_cgn_params_read(), then we rely on
lpfc_read_object()'s routine to NULL check pdata.
Currently, an early return error is thrown from lpfc_read_object() to
protect us from NULL ptr dereference, but the errno code is -ENODEV.
Change the errno code to a more appropriate -ENOMEM.
Reported-by: Kang Chen <[email protected]>
Link: https://lore.kernel.org/all/[email protected]
Signed-off-by: Justin Tee <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions