Re: [PATCH v2] ARM: imx: fix error handling

2014-05-18 Thread Emil Goode
I appologise for providing incomplete information in my previous message. The involved call sites are the following: arch/arm/mach-imx/mach-mx35_3ds.c +265 imx35_3ds_init_camera() imx35_alloc_mx3_camera() imx_alloc_mx3_camera() dma_declare_coherent_memory()

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-18 Thread Emil Goode
Hello Uwe, On Sat, May 17, 2014 at 09:05:46PM +0200, Uwe Kleine-König wrote: > Hello Emil, > > On Sat, May 17, 2014 at 05:35:40PM +0200, Emil Goode wrote: > > On Fri, May 16, 2014 at 09:31:39PM +0200, Uwe Kleine-König wrote: > > > On Fri, May 16, 2014 at 01:49:10PM +0200, walter harms wrote: > >

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-17 Thread Emil Goode
Hello Uwe, On Sat, May 17, 2014 at 09:05:46PM +0200, Uwe Kleine-König wrote: > Hello Emil, > > On Sat, May 17, 2014 at 05:35:40PM +0200, Emil Goode wrote: > > On Fri, May 16, 2014 at 09:31:39PM +0200, Uwe Kleine-König wrote: > > > On Fri, May 16, 2014 at 01:49:10PM +0200, walter harms wrote: > >

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-17 Thread Uwe Kleine-König
Hello Emil, On Sat, May 17, 2014 at 05:35:40PM +0200, Emil Goode wrote: > On Fri, May 16, 2014 at 09:31:39PM +0200, Uwe Kleine-König wrote: > > On Fri, May 16, 2014 at 01:49:10PM +0200, walter harms wrote: > > > Am 16.05.2014 13:16, schrieb Emil Goode: > > > > Hello Walter, > > > > > > > > On Fri

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-17 Thread Emil Goode
Hello Uwe, On Fri, May 16, 2014 at 09:31:39PM +0200, Uwe Kleine-König wrote: > Hello Walter, > > On Fri, May 16, 2014 at 01:49:10PM +0200, walter harms wrote: > > Am 16.05.2014 13:16, schrieb Emil Goode: > > > Hello Walter, > > > > > > On Fri, May 16, 2014 at 12:40:19PM +0200, walter harms wrote

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-16 Thread Emil Goode
Hello Uwe, Thank you for the review. On Fri, May 16, 2014 at 09:24:51PM +0200, Uwe Kleine-König wrote: > Hello Emil, > > IMHO the subject is too general. Maybe better use: > > ARM: imx: fix error handling in ipu device registration Agreed, will change this and resend. > > On Fri, May 1

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-16 Thread Emil Goode
On Sat, May 17, 2014 at 01:21:08AM +0300, Dan Carpenter wrote: > On Fri, May 16, 2014 at 09:24:51PM +0200, Uwe Kleine-König wrote: > > I didn't check if it is easily possible, but converting this file to use > > platform_device_register_full might simplify it considerably. > > In a separate patch

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-16 Thread Dan Carpenter
On Fri, May 16, 2014 at 09:24:51PM +0200, Uwe Kleine-König wrote: > I didn't check if it is easily possible, but converting this file to use > platform_device_register_full might simplify it considerably. In a separate patch, though, please. > > I'm not sure this fix is critical, because the pro

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-16 Thread Uwe Kleine-König
Hello Walter, On Fri, May 16, 2014 at 01:49:10PM +0200, walter harms wrote: > Am 16.05.2014 13:16, schrieb Emil Goode: > > Hello Walter, > > > > On Fri, May 16, 2014 at 12:40:19PM +0200, walter harms wrote: > >> > >> > >> Am 16.05.2014 11:54, schrieb Emil Goode: > >>> If we fail to allocate struc

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-16 Thread Uwe Kleine-König
Hello Emil, IMHO the subject is too general. Maybe better use: ARM: imx: fix error handling in ipu device registration On Fri, May 16, 2014 at 11:54:05AM +0200, Emil Goode wrote: > If we fail to allocate struct platform_device pdev we > dereference it after the goto label err. > > I hav

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-16 Thread walter harms
Am 16.05.2014 13:16, schrieb Emil Goode: > Hello Walter, > > On Fri, May 16, 2014 at 12:40:19PM +0200, walter harms wrote: >> >> >> Am 16.05.2014 11:54, schrieb Emil Goode: >>> If we fail to allocate struct platform_device pdev we >>> dereference it after the goto label err. >>> >>> I have rearr

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-16 Thread Emil Goode
Hello Walter, On Fri, May 16, 2014 at 12:40:19PM +0200, walter harms wrote: > > > Am 16.05.2014 11:54, schrieb Emil Goode: > > 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 >

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-16 Thread walter harms
Am 16.05.2014 11:54, schrieb Emil Goode: > 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 > --- > v2: Changed to return

[PATCH v2] ARM: imx: fix error handling

2014-05-16 Thread Emil Goode
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 --- v2: Changed to return -ENOMEM instead of ret where possible and updated the su