[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20140502141804.GB4631@saruman.home>
Date: Fri, 2 May 2014 09:18:04 -0500
From: Felipe Balbi <balbi@...com>
To: George Cherian <george.cherian@...com>
CC: <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
<mugunthanvnm@...com>, <davem@...emloft.net>, <balbi@...com>,
<zonque@...il.com>, <mpa@...gutronix.de>,
<bhutchings@...arflare.com>
Subject: Re: [PATCH 2/3] net: davinci_mdio: Convert pr_err() to dev_err() call
On Fri, May 02, 2014 at 03:50:16PM +0530, George Cherian wrote:
> Convert the lone pr_err() to dev_err() call.
> Also, Convert kzalloc to devm_kzalloc.
>
> Signed-off-by: George Cherian <george.cherian@...com>
> ---
there's a kfree(data) on davinci_mdio_remove() which could be deleted
too. Other than that:
Reviewed-by: Felipe Balbi <balbi@...com>
> drivers/net/ethernet/ti/davinci_mdio.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
> index 0cca9de..1b2e30a 100644
> --- a/drivers/net/ethernet/ti/davinci_mdio.c
> +++ b/drivers/net/ethernet/ti/davinci_mdio.c
> @@ -303,7 +303,7 @@ static int davinci_mdio_probe_dt(struct mdio_platform_data *data,
> return -EINVAL;
>
> if (of_property_read_u32(node, "bus_freq", &prop)) {
> - pr_err("Missing bus_freq property in the DT.\n");
> + dev_err(&pdev->dev, "Missing bus_freq property in the DT.\n");
> return -EINVAL;
> }
> data->bus_freq = prop;
> @@ -321,7 +321,7 @@ static int davinci_mdio_probe(struct platform_device *pdev)
> struct phy_device *phy;
> int ret, addr;
>
> - data = kzalloc(sizeof(*data), GFP_KERNEL);
> + data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
> if (!data)
> return -ENOMEM;
>
> @@ -414,8 +414,6 @@ bail_out:
> pm_runtime_put_sync(&pdev->dev);
> pm_runtime_disable(&pdev->dev);
>
> - kfree(data);
> -
> return ret;
> }
>
> --
> 1.8.3.1
>
--
balbi
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists