Re: [PATCH RFC v2 2/2] pinctrl: add pinctrl gpio binding support

From: Stephen Warren
Date: Tue May 22 2012 - 13:12:31 EST


On 05/21/2012 09:35 PM, Dong Aisheng wrote:
> On Sat, May 19, 2012 at 04:05:46AM +0800, Stephen Warren wrote:
> ...
>>> + np_gpio = of_find_node_by_phandle(phandle);
>>> + if (!np_gpio) {
>>> + dev_err(pctldev->dev,
>>> + "failed to find gpio node(%s)\n",
>>> + np_gpio->name);
>>
>> Perhaps devm_kfree(ranges) here so that if this is called multiple times
>> due to deferred probe, the allocations from the failed attempts don't
>> accumulate. Same for other error paths.
>
> I checked a bit more, it seems the resource will be removed first if there's
> a deffer probe error.

Oh yes of course - that makes sense.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/