[PATCH 6/6] of/device: populate platform_device (of_device) resource table on allocation

Grant Likely grant.likely at secretlab.ca
Fri Jun 11 03:21:16 EST 2010


On Thu, Jun 10, 2010 at 11:10 AM, Anton Vorontsov
<cbouatmailru at gmail.com> wrote:
> On Thu, Jun 10, 2010 at 10:30:26AM -0600, Grant Likely wrote:
> [...]
>>       res = kzalloc((sizeof(*res) * num_res), GFP_KERNEL);
>>       if (!res) {
>>               kfree(ofdev);  /* or goto an error unwind label */
>>               return NULL;
>>       }
>>       res = (struct resource *)&ofdev[1];
>
> You mean ofdev->resource = res; ?

Yeah, cut-and-paste error.

g.


More information about the devicetree-discuss mailing list