Re: [PATCH v4] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereference

2014-08-16 Thread Rickard Strandqvist
2014-08-02 13:30 GMT+02:00 Wolfram Sang : > Hi, > >> res = platform_get_resource(dev, IORESOURCE_MEM, 0); >> irq = platform_get_irq(dev, 0); >> - if (res == NULL || irq < 0) { >> - ret = -ENODEV; >> - goto eclk; >> - } >> + if (res == NULL || irq < 0)

Re: [PATCH v4] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereference

2014-08-02 Thread Wolfram Sang
Hi, > res = platform_get_resource(dev, IORESOURCE_MEM, 0); > irq = platform_get_irq(dev, 0); > - if (res == NULL || irq < 0) { > - ret = -ENODEV; > - goto eclk; > - } > + if (res == NULL || irq < 0) > + return -ENODEV; No need to check f

[PATCH v4] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereference

2014-07-16 Thread Rickard Strandqvist
Fix for possible null pointer dereference, and there was a risk for memory leak if something unexpected happens and the function returns. It now uses the Managed Device Resource instead. Signed-off-by: Rickard Strandqvist --- drivers/i2c/busses/i2c-pxa.c | 65 ++

[PATCH v4] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereference

2014-07-16 Thread Rickard Strandqvist
This start as a fix for possible null pointer dereference. But after discussion with especially Wolfram, Jingoo and Emil it was decided to convert the code to uses Managed Device Resource instead. Rickard Strandqvist (1): i2c: busses: i2c-pxa.c: Fix for possible null pointer dereference drive