lkml.org 
[lkml]   [2016]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

\
 
 \ /
  Last update: 2016-09-17 09:58    [W:0.064 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site