netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] ionic: Fix an error code in ionic_lif_alloc()
@ 2019-09-21  5:59 Dan Carpenter
  2019-09-22 18:21 ` Shannon Nelson
  2019-09-22 21:17 ` Jakub Kicinski
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2019-09-21  5:59 UTC (permalink / raw)
  To: Shannon Nelson; +Cc: Pensando Drivers, David S. Miller, netdev, kernel-janitors

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>
---
 drivers/net/ethernet/pensando/ionic/ionic_lif.c | 1 +
 1 file changed, 1 insertion(+)

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;
 	}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-22 22:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-21  5:59 [PATCH net] ionic: Fix an error code in ionic_lif_alloc() Dan Carpenter
2019-09-22 18:21 ` Shannon Nelson
2019-09-22 21:17 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).