Messages in this thread | | | Date | Thu, 10 Jul 2014 18:22:15 +0200 | From | Jiri Slaby <> | Subject | Re: [PATCH] drivers: tty: Remove redundant memset() in initialize_tty_struct |
| |
On 07/10/2014 06:16 PM, Rasmus Villemoes wrote: > All callers (all two) of initialize_tty_struct() have just obtained > the passed tty_struct from alloc_tty_struct(), which uses > kzalloc(). So there is no reason to clear the memory again.
Actually I don't see a reason to have initialize_tty_struct as a separate function. In both cases it is called after alloc_tty_struct. So it would make sense to move the initialization to alloc_tty_struct. (And move try_module_get before alloc_tty_struct in pty_common_install.)
Could you do that?
-- js suse labs
| |