[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fb68ea47-9d94-143d-0ee1-b7ba7da2c378@ti.com>
Date: Tue, 22 May 2018 14:13:43 +0530
From: Sekhar Nori <nsekhar@...com>
To: David Lechner <david@...hnology.com>, <linux-clk@...r.kernel.org>,
<devicetree@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>
CC: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...eaurora.org>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Kevin Hilman <khilman@...nel.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Adam Ford <aford173@...il.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v11 01/27] clk: davinci: pll: allow dev == NULL
On Friday 18 May 2018 10:18 PM, David Lechner wrote:
> @@ -711,11 +777,11 @@ int of_davinci_pll_init(struct device *dev,
> int n_clks = max_sysclk_id + 1;
> int i;
>
> - clk_data = devm_kzalloc(dev, sizeof(*clk_data), GFP_KERNEL);
> + clk_data = kzalloc(sizeof(*clk_data), GFP_KERNEL);
> if (!clk_data)
> return -ENOMEM;
>
> - clks = devm_kmalloc_array(dev, n_clks, sizeof(*clks), GFP_KERNEL);
> + clks = kmalloc_array(n_clks, sizeof(*clks), GFP_KERNEL);
> if (!clks)
> return -ENOMEM;
This should be:
if (!clks) {
kfree(clk_data);
return -ENOMEM;
}
With that fixed:
Reviewed-by: Sekhar Nori <nsekhar@...com>
Thanks,
Sekhar
Powered by blists - more mailing lists