[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160906175951.etybwtilfvyclrdb@tarshish>
Date: Tue, 6 Sep 2016 20:59:51 +0300
From: Baruch Siach <baruch@...s.co.il>
To: Marcin Wojtas <mw@...ihalf.com>
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-clk@...r.kernel.org, sboyd@...eaurora.org,
mturquette@...libre.com, thomas.petazzoni@...e-electrons.com,
andrew@...n.ch, jason@...edaemon.net, tn@...ihalf.com,
stable@...r.kernel.org, nadavh@...vell.com, alior@...vell.com,
jaz@...ihalf.com, gregory.clement@...e-electrons.com,
sebastian.hesselbarth@...il.com
Subject: Re: [PATCH v2 2/3] clk: mvebu: dynamically allocate resources in
Armada CP110 system controller
Hi Marcin,
On Tue, Sep 06, 2016 at 07:31:56PM +0200, Marcin Wojtas wrote:
> + cp110_clks = devm_kcalloc(&pdev->dev, sizeof(struct clk *),
> + CP110_CLK_NUM, GFP_KERNEL);
> + if (!cp110_clks)
> + return PTR_ERR(cp110_clks);
PTR_ERR(NULL) translates to 0. Should probably just return -ENOMEM.
> + cp110_clk_data = devm_kzalloc(&pdev->dev,
> + sizeof(*cp110_clk_data),
> + GFP_KERNEL);
> + if (!cp110_clk_data)
> + return PTR_ERR(cp110_clk_data);
Ditto.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@...s.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
Powered by blists - more mailing lists