[PATCH] ARM:common: setting saved_state to NULL after kfree

Chen Gang gang.chen at asianux.com
Tue Jan 29 06:34:09 EST 2013


于 2013年01月29日 19:15, Russell King - ARM Linux 写道:
> On Tue, Jan 29, 2013 at 07:11:43PM +0800, Chen Gang wrote:
>> >   need set NULL before return, just like function sa1111_remove has done.
>> >   and better to use sa1111_remove directly, instead of current implementation.
> NAK.
> 
> 1. __sa1111_remove() will kfree sachip, so the value of sachip->saved_state
>    at this point is meaningless.

  yes, just like what you said. it is not a bug
    (it seems not necessary to set saved_state to NULL in sa1111_remove, either).

  I think, this patch can make the source code simpler and clearer.
  so I still suggest to apply it (although it seems a minor patch).


> 2. I don't think you tried to build with your patch in place.
> 
> 
  it is my fault, just like what you said, I did not try to build.
  and I should try now.

  thanks.

-- 
Chen Gang

Asianux Corporation



More information about the linux-arm-kernel mailing list