[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200721113145.43c24155@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Tue, 21 Jul 2020 11:31:45 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Tony Nguyen <anthony.l.nguyen@...el.com>
Cc: davem@...emloft.net, Alice Michael <alice.michael@...el.com>,
netdev@...r.kernel.org, nhorman@...hat.com, sassmann@...hat.com,
jeffrey.t.kirsher@...el.com, Alan Brady <alan.brady@...el.com>,
Phani Burra <phani.r.burra@...el.com>,
Joshua Hay <joshua.a.hay@...el.com>,
Madhu Chittim <madhu.chittim@...el.com>,
Pavan Kumar Linga <pavan.kumar.linga@...el.com>,
Donald Skidmore <donald.c.skidmore@...el.com>,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
Sridhar Samudrala <sridhar.samudrala@...el.com>
Subject: Re: [net-next v4 06/15] iecm: Implement mailbox functionality
On Mon, 20 Jul 2020 17:38:01 -0700 Tony Nguyen wrote:
> + struct iecm_adapter *adapter = vport->adapter;
> + netdev_features_t dflt_features;
> + netdev_features_t offloads = 0;
> + struct iecm_netdev_priv *np;
> + struct net_device *netdev;
> + int err;
> +
> + netdev = alloc_etherdev_mqs(sizeof(struct iecm_netdev_priv),
> + IECM_MAX_Q, IECM_MAX_Q);
> + if (!netdev)
> + return -ENOMEM;
> + vport->netdev = netdev;
> + np = netdev_priv(netdev);
> + np->vport = vport;
> + /* register last */
> + err = register_netdev(netdev);
> + if (err)
> + return err;
aren't you leaking the netdev here?
> + return 0;
Powered by blists - more mailing lists