Re: [PATCH v3] ARM: imx: fix error handling in ipu device registration

2014-05-17 Thread Emil Goode
Hello Russell, On Sat, May 17, 2014 at 11:35:55PM +0100, Russell King - ARM Linux wrote: > On Sun, May 18, 2014 at 01:08:36AM +0300, Dan Carpenter wrote: > > Let's look at that error handling again. > > > > err: <-- the name is not descriptive. the location is bad. > > kfree(pdev->d

Re: [PATCH v3] ARM: imx: fix error handling in ipu device registration

2014-05-17 Thread Dan Carpenter
On Sat, May 17, 2014 at 11:35:55PM +0100, Russell King - ARM Linux wrote: > On Sun, May 18, 2014 at 01:08:36AM +0300, Dan Carpenter wrote: > > Let's look at that error handling again. > > > > err: <-- the name is not descriptive. the location is bad. > > kfree(pdev->dev.dma_mask); <

Re: [PATCH v3] ARM: imx: fix error handling in ipu device registration

2014-05-17 Thread Emil Goode
Hello Dan, On Sun, May 18, 2014 at 01:08:36AM +0300, Dan Carpenter wrote: > On Sat, May 17, 2014 at 09:18:21PM +0200, Uwe Kleine-König wrote: > > diff --git a/arch/arm/mach-imx/devices/platform-ipu-core.c > > b/arch/arm/mach-imx/devices/platform-ipu-core.c > > index fc4dd7cedc11..6bd7c3f37ac0 100

Re: [PATCH v3] ARM: imx: fix error handling in ipu device registration

2014-05-17 Thread Russell King - ARM Linux
On Sun, May 18, 2014 at 01:08:36AM +0300, Dan Carpenter wrote: > Let's look at that error handling again. > > err: <-- the name is not descriptive. the location is bad. > kfree(pdev->dev.dma_mask); <- null dereference. > platform_device_put(pdev); <- ok >

Re: [PATCH v3] ARM: imx: fix error handling in ipu device registration

2014-05-17 Thread Emil Goode
Hello Uwe, I was to quick to resend the patch, sorry. On Sat, May 17, 2014 at 09:18:21PM +0200, Uwe Kleine-König wrote: > Hello Emil, > > On Sat, May 17, 2014 at 08:40:33PM +0200, Emil Goode wrote: > > If we fail to allocate struct platform_device pdev we > > dereference it after the goto label

Re: [PATCH v3] ARM: imx: fix error handling in ipu device registration

2014-05-17 Thread Dan Carpenter
On Sat, May 17, 2014 at 09:18:21PM +0200, Uwe Kleine-König wrote: > diff --git a/arch/arm/mach-imx/devices/platform-ipu-core.c > b/arch/arm/mach-imx/devices/platform-ipu-core.c > index fc4dd7cedc11..6bd7c3f37ac0 100644 > --- a/arch/arm/mach-imx/devices/platform-ipu-core.c > +++ b/arch/arm/mach-imx

Re: [PATCH v3] ARM: imx: fix error handling in ipu device registration

2014-05-17 Thread Uwe Kleine-König
Hello Emil, On Sat, May 17, 2014 at 08:40:33PM +0200, Emil Goode wrote: > If we fail to allocate struct platform_device pdev we > dereference it after the goto label err. > > I have rearranged the error handling a bit to fix the issue > and also make it more clear. > > Signed-off-by: Emil Goode