aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
diff options
context:
space:
mode:
authorArkadiusz Kubalewski <[email protected]>2021-03-26 18:43:41 +0000
committerTony Nguyen <[email protected]>2021-04-08 17:21:37 +0000
commitd6d04ee6d2c9bb5084c8f6074195d6aa0024e825 (patch)
tree1cbfc32dd64d5999a341fbb0ed90f9c2b720f7a0 /drivers/net/ethernet/intel/i40e/i40e_debugfs.c
parenti40e: Fix sparse errors in i40e_txrx.c (diff)
downloadkernel-d6d04ee6d2c9bb5084c8f6074195d6aa0024e825.tar.gz
kernel-d6d04ee6d2c9bb5084c8f6074195d6aa0024e825.zip
i40e: Fix sparse error: uninitialized symbol 'ring'
Init pointer with NULL in default switch case statement. Previously the error was produced when compiling against sparse. i40e_debugfs.c:582 i40e_dbg_dump_desc() error: uninitialized symbol 'ring'. Fixes: 44ea803e2fa7 ("i40e: introduce new dump desc XDP command") Signed-off-by: Aleksandr Loktionov <[email protected]> Signed-off-by: Arkadiusz Kubalewski <[email protected]> Tested-by: Dave Switzer <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_debugfs.c')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_debugfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
index d7c13ca9be7d..d627b59ad446 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
@@ -578,6 +578,9 @@ static void i40e_dbg_dump_desc(int cnt, int vsi_seid, int ring_id, int desc_n,
case RING_TYPE_XDP:
ring = kmemdup(vsi->xdp_rings[ring_id], sizeof(*ring), GFP_KERNEL);
break;
+ default:
+ ring = NULL;
+ break;
}
if (!ring)
return;