Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1477714

Re: [PATCH v2 2/3] clk: mvebu: dynamically allocate resources in Armada CP110 system controller

From Baruch Siach <baruch@tkos.co.il>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/3] clk: mvebu: dynamically allocate resources in Armada CP110 system controller
Date 2016-09-06 20:10 +0200
Message-ID <sesYN-5oF-5@gated-at.bofh.it> (permalink)
References <sesm5-4Wc-9@gated-at.bofh.it> <sesm5-4Wc-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2 2/3] clk: mvebu: dynamically allocate resources in Armada CP110 system controller Marcin Wojtas <mw@semihalf.com> - 2016-09-06 19:30 +0200
  Re: [PATCH v2 2/3] clk: mvebu: dynamically allocate resources in  Armada CP110 system controller Baruch Siach <baruch@tkos.co.il> - 2016-09-06 20:10 +0200

csiph-web