[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140424144717.GI26661@saruman.home>
Date: Thu, 24 Apr 2014 09:47:17 -0500
From: Felipe Balbi <balbi@...com>
To: Chanwoo Choi <cw00.choi@...sung.com>
CC: <linux-kernel@...r.kernel.org>, <myungjoo.ham@...sung.com>,
<balbi@...com>, <gg@...mlogic.co.uk>, <kishon@...com>,
<ckeepax@...nsource.wolfsonmicro.com>, <broonie@...nel.org>,
<k.kozlowski@...sung.com>, <kyungmin.park@...sung.com>,
Samuel Ortiz <sameo@...ux.intel.com>,
Lee Jones <lee.jones@...aro.org>
Subject: Re: [PATCHv3 9/9] extcon: palmas: Use devm_extcon_dev_allocate for
extcon_dev
On Thu, Apr 24, 2014 at 09:34:57PM +0900, Chanwoo Choi wrote:
> This patch use devm_extcon_dev_allocate() to simplify the memory control
> of extcon device.
>
> Cc: Graeme Gregory <gg@...mlogic.co.uk>
> Cc: Kishon Vijay Abraham I <kishon@...com>
> Cc: Felipe Balbi <balbi@...com>
> Cc: Samuel Ortiz <sameo@...ux.intel.com>
> Cc: Lee Jones <lee.jones@...aro.org>
> Signed-off-by: Chanwoo Choi <cw00.choi@...sung.com>
> Acked-by: Lee Jones <lee.jones@...aro.org>
Tested-by: Felipe Balbi <balbi@...com>
*BUT* you need to fix NULL vs ERR_PTR return in your code. The way this
is, we can easily dereference an ERR_PTR because the code doesn't test
for it. I suggest always returning valid pointer or ERR_PTR and avoid
returning NULL at all.
--
balbi
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists