ionic: Fix an error code in ionic_lif_alloc()
Subsystems (4)
PATCH 1/1 ionic: Fix an error code in ionic_lif_alloc()
We need to set the error code on this path. Otherwise it probably results in a NULL dereference down the line.
Fixes aa3198819bea ("ionic: Add RSS support")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/pensando/ionic/ionic_lif.c +1 -0
@@ -1704,6 +1704,7 @@ static struct ionic_lif *ionic_lif_alloc(struct ionic *ionic, unsigned int index GFP_KERNEL);if (!lif->rss_ind_tbl) { + err = -ENOMEM ;dev_err (dev,"Failed to allocate rss indirection table, aborting\n" ); goto err_out_free_qcqs; }
Signature · 1 line
2.20.1
Quoted 14 lines · Dan Carpenter
We need to set the error code on this path. Otherwise it probably results in a NULL dereference down the line.
Fixes aa3198819bea ("ionic: Add RSS support")Signed-off-by Dan Carpenter <[email protected]>--- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ethernet/pensando/ionic/ionic_lif.c +0
-0
drivers/net/ethernet/pensando/ionic/ionic_lif.c static struct ionic_lif *ionic_lif_alloc(struct ionic *ionic, unsigned int index · line 1710
Quoted 7 lines
drivers/net/ethernet/pensando/ionic/ionic_lif.c +1
-0@@ -1704,6 +1704,7 @@ static struct ionic_lif *ionic_lif_alloc(struct ionic *ionic, unsigned int index GFP_KERNEL);if (!lif->rss_ind_tbl) { + err = -ENOMEM ;dev_err (dev,"Failed to allocate rss indirection table, aborting\n" ); goto err_out_free_qcqs; }
Thanks, Dan.
Acked-by Shannon Nelson <[email protected]>
Jakub Kicinski
AppliedQuoted 5 lines · Dan Carpenter
We need to set the error code on this path. Otherwise it probably results in a NULL dereference down the line.
Fixes aa3198819bea ("ionic: Add RSS support")Signed-off-by Dan Carpenter <[email protected]>
Applied, thank you!