Skip to content

Commit

Permalink
octeontx2-af: debugfs: fix error return of allocations
Browse files Browse the repository at this point in the history
Current memory failure code in the debugfs returns -ENOSPC. This is
normally used for indicating that there is no space left on the
device and is not applicable for memory allocation failures.
Replace this with -ENOMEM.

Signed-off-by: Niels Dossche <dossche.niels@gmail.com>
Link: https://lore.kernel.org/r/20220430194656.44357-1-dossche.niels@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Niels Dossche authored and Jakub Kicinski committed May 2, 2022
1 parent e1ff0bd commit 0b9f1b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ static ssize_t rvu_dbg_lmtst_map_table_display(struct file *filp,

buf = kzalloc(buf_size, GFP_KERNEL);
if (!buf)
return -ENOSPC;
return -ENOMEM;

tbl_base = rvu_read64(rvu, BLKADDR_APR, APR_AF_LMT_MAP_BASE);

Expand Down Expand Up @@ -407,7 +407,7 @@ static ssize_t rvu_dbg_rsrc_attach_status(struct file *filp,

buf = kzalloc(buf_size, GFP_KERNEL);
if (!buf)
return -ENOSPC;
return -ENOMEM;

/* Get the maximum width of a column */
lf_str_size = get_max_column_width(rvu);
Expand Down

0 comments on commit 0b9f1b2

Please sign in to comment.