[PATCH] of/irq: init struct resource to 0 in of_irq_to_resource()

Grant Likely grant.likely at linaro.org
Sat Jul 20 15:55:05 EST 2013


On Thu, 18 Jul 2013 21:49:27 -0500, Rob Herring <robherring2 at gmail.com> wrote:
> On 07/18/2013 05:24 AM, Sebastian Andrzej Siewior wrote:
> > It almost does not matter because most users use only the ->start member
> > of the struct. However if this struct is passed to a platform device
> > which is then added via platform_device_add() then the ->parent member is
> > also used.
> 
> Most users don't use the resource struct at all. The ones that do, all
> seem to do a memset beforehand. So I think current behavior is correct.
> 
> There are some occurrences that pass a resource in, but then don't
> actually use the resource. Those we should fix.

It's a reasonable safeguard though. I'm going to apply it.

g.


More information about the devicetree-discuss mailing list