summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-09-21 08:59:26 +0300
committerJakub Kicinski <jakub.kicinski@netronome.com>2019-09-23 00:16:15 +0300
commit73a63ee9955494e18a6f7d9ba396f5e78e3ce307 (patch)
tree04594ccc8a23f91f2b55e9e405c946ec2d94f500 /drivers
parentff04cfbaa23644562f369eeca0b44ef66e185c9e (diff)
downloadlinux-73a63ee9955494e18a6f7d9ba396f5e78e3ce307.tar.xz
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 <dan.carpenter@oracle.com> Acked-by: Shannon Nelson <snelson@pensando.io> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/pensando/ionic/ionic_lif.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index db7c82742828..72107a0627a9 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -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;
}