lkml.org 
[lkml]   [2013]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3] media: i2c: tvp514x: add OF support
Hi Laurent,

Thanks for the review.

On Thu, May 16, 2013 at 5:40 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Prabhakar,
>
[Snip]
>> +
>> + pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL);
>> + if (!pdata)
>
> I've started playing with the V4L2 OF bindings, and realized that should
> should call of_node_put() here.
>
you were referring of_node_get() here rite ?

of_node_get/put() got recently added I guess coz of which I missed it :)

>> + return NULL;
>> +
>> + v4l2_of_parse_endpoint(endpoint, &bus_cfg);
>> + flags = bus_cfg.bus.parallel.flags;
>> +
>> + if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
>> + pdata->hs_polarity = 1;
>> +
>> + if (flags & V4L2_MBUS_VSYNC_ACTIVE_HIGH)
>> + pdata->vs_polarity = 1;
>> +
>> + if (flags & V4L2_MBUS_PCLK_SAMPLE_RISING)
>> + pdata->clk_polarity = 1;
>> +
>
> As well as here. Maybe a
>
> done:
> of_node_put(endpoint);
> return pdata;
>
> with a goto done in the devm_kzalloc error path would be better.
>
OK

Regards,
--Prabhakar Lad


\
 
 \ /
  Last update: 2013-05-16 15:21    [W:0.061 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site