Messages in this thread | | | Date | Fri, 25 Apr 2014 00:13:12 +0900 | Subject | Re: [PATCHv3 9/9] extcon: palmas: Use devm_extcon_dev_allocate for extcon_dev | From | Chanwoo Choi <> |
| |
On Thu, Apr 24, 2014 at 11:47 PM, Felipe Balbi <balbi@ti.com> wrote: > 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@slimlogic.co.uk> >> Cc: Kishon Vijay Abraham I <kishon@ti.com> >> Cc: Felipe Balbi <balbi@ti.com> >> Cc: Samuel Ortiz <sameo@linux.intel.com> >> Cc: Lee Jones <lee.jones@linaro.org> >> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> >> Acked-by: Lee Jones <lee.jones@linaro.org> > > Tested-by: Felipe Balbi <balbi@ti.com>
Thanks for your test.
> > *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.
OK, as my reply on other mail, I'll fix return type by using ERR_PTR instead of NULL.
Thanks, Chanwoo Choi
| |