diff options
author | Kevin Hao <[email protected]> | 2021-02-09 18:15:16 +0800 |
---|---|---|
committer | David S. Miller <[email protected]> | 2021-02-10 15:16:35 -0800 |
commit | 1fb3ca767529e94efbd770048163a00eba644c1c (patch) | |
tree | 4e1d6c4bbaf23564b1e44991faeb9ffd392aa855 /tools/perf/scripts/python | |
parent | d816f2a9cb5a4e5c850f94eeb6134abec07f006d (diff) |
net: octeontx2: Fix the confusion in buffer alloc failure path
Pavel pointed that the return of dma_addr_t in
otx2_alloc_rbuf/__otx2_alloc_rbuf() seem suspicious because a negative
error code may be returned in some cases. For a dma_addr_t, the error
code such as -ENOMEM does seem a valid value, so we can't judge if the
buffer allocation fail or not based on that value. Add a parameter for
otx2_alloc_rbuf/__otx2_alloc_rbuf() to store the dma address and make
the return value to indicate if the buffer allocation really fail or
not.
Reported-by: Pavel Machek <[email protected]>
Signed-off-by: Kevin Hao <[email protected]>
Tested-by: Subbaraya Sundeep <[email protected]>
Reviewed-by: Alexander Duyck <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions