Skip to content

Commit

Permalink
ionic: Fix an error code in ionic_lif_alloc()
Browse files Browse the repository at this point in the history
We need to set the error code on this path.  Otherwise it probably
results in a NULL dereference down the line.

Fixes: aa31988 ("ionic: Add RSS support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
  • Loading branch information
Dan Carpenter authored and Jakub Kicinski committed Sep 22, 2019
1 parent ff04cfb commit 73a63ee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/pensando/ionic/ionic_lif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 73a63ee

Please sign in to comment.