Re: [PATCH v3] i2c: busses/i2c-pxa.c: fix potential null pointer dereference error

2013-03-21 Thread Wolfram Sang
On Thu, Feb 14, 2013 at 12:28:18PM +0100, Cong Ding wrote: > If it goes to eclk through line 1107, the variable res would be NULL. It will > cause a null pointer dereference error if we call release_mem_region. The > correct way should be using devm_kzalloc rather than kzalloc to allocate > memory.

Re: [PATCH v3] i2c: busses/i2c-pxa.c: fix potential null pointer dereference error

2013-02-14 Thread Haojian Zhuang
On Thu, Feb 14, 2013 at 7:28 PM, Cong Ding wrote: > If it goes to eclk through line 1107, the variable res would be NULL. It will > cause a null pointer dereference error if we call release_mem_region. The > correct way should be using devm_kzalloc rather than kzalloc to allocate > memory. > > Sig