Messages in this thread | | | Date | Wed, 11 Apr 2012 13:29:56 +0530 | From | Viresh Kumar <> | Subject | Re: [PATCH 2/2] dma/amba-pl08x: add support for the Nomadik variant |
| |
On 4/11/2012 1:29 PM, Linus Walleij wrote: >>> >> + ch->locked = true; >>> >> + } else >>> >> + ch->locked = false; >>> >> + } >>> >> + >> > >> > Memory for ch is allocated with kmalloc and so its default value is garbage. >> > So we must set locked to false in else part here. > Hm maybe better to kzalloc() the channel structs? >
Then, you can remove code which makes its field zero explicitly, as it is already zero.
-- viresh
| |