[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190819161142.6f4cc14d@cakuba.netronome.com>
Date: Mon, 19 Aug 2019 16:11:42 -0700
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc: davem@...emloft.net, Paul Greenwalt <paul.greenwalt@...el.com>,
netdev@...r.kernel.org, nhorman@...hat.com, sassmann@...hat.com,
Andrew Bowers <andrewx.bowers@...el.com>
Subject: Re: [net-next v2 04/14] ice: fix set pause param autoneg check
On Mon, 19 Aug 2019 09:16:58 -0700, Jeff Kirsher wrote:
> + pcaps = devm_kzalloc(&vsi->back->pdev->dev, sizeof(*pcaps),
> + GFP_KERNEL);
> + if (!pcaps)
> + return -ENOMEM;
> +
> + /* Get current PHY config */
> + status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_SW_CFG, pcaps,
> + NULL);
> + if (status) {
> + devm_kfree(&vsi->back->pdev->dev, pcaps);
> + return -EIO;
> + }
> +
> + is_an = ((pcaps->caps & ICE_AQC_PHY_AN_MODE) ?
> + AUTONEG_ENABLE : AUTONEG_DISABLE);
> +
> + devm_kfree(&vsi->back->pdev->dev, pcaps);
Is it just me or is this use of devm_k*alloc absolutely pointless?
Powered by blists - more mailing lists