On 09/03/2012 07:11 PM, Russell King - ARM Linux wrote:
> On Mon, Sep 03, 2012 at 06:13:33PM +0800, Wei Yongjun wrote:
>> @@ -130,6 +132,7 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod
>> *oh, void *unused)
>>
>> pdev = omap_device_build(name, id - 1, oh, pdata,
>>
On Mon, Sep 03, 2012 at 06:13:33PM +0800, Wei Yongjun wrote:
> @@ -130,6 +132,7 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod
> *oh, void *unused)
>
> pdev = omap_device_build(name, id - 1, oh, pdata,
> sizeof(*pdata), NULL, 0, false);
> + kfr
From: Wei Yongjun
pdata and pdata->regs have been allocated in this function and
should be freed before leaving it, and in the other error handling
cases too.
spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)
Signed-off-by: Wei Yongjun
---
arch/arm/mach