From: Dan Carpenter Date: Sat, 21 Sep 2019 05:59:26 +0000 (+0300) Subject: ionic: Fix an error code in ionic_lif_alloc() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=73a63ee9955494e18a6f7d9ba396f5e78e3ce307;p=openwrt%2Fstaging%2Fblogic.git 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 Acked-by: Shannon Nelson Signed-off-by: Jakub Kicinski --- 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; }