--- zzzz-none-000/linux-3.10.107/drivers/tty/n_hdlc.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/tty/n_hdlc.c 2021-02-04 17:41:59.000000000 +0000 @@ -836,13 +836,11 @@ { struct n_hdlc_buf *buf; int i; - struct n_hdlc *n_hdlc = kmalloc(sizeof(*n_hdlc), GFP_KERNEL); + struct n_hdlc *n_hdlc = kzalloc(sizeof(*n_hdlc), GFP_KERNEL); if (!n_hdlc) return NULL; - memset(n_hdlc, 0, sizeof(*n_hdlc)); - spin_lock_init(&n_hdlc->rx_free_buf_list.spinlock); spin_lock_init(&n_hdlc->tx_free_buf_list.spinlock); spin_lock_init(&n_hdlc->rx_buf_list.spinlock); @@ -947,8 +945,6 @@ KERN_INFO "N_HDLC line discipline registered.\n"; static char hdlc_register_fail[] __initdata = KERN_ERR "error registering line discipline: %d\n"; -static char hdlc_init_fail[] __initdata = - KERN_INFO "N_HDLC: init failure %d\n"; static int __init n_hdlc_init(void) { @@ -968,8 +964,6 @@ else printk(hdlc_register_fail, status); - if (status) - printk(hdlc_init_fail, status); return status; } /* end of init_module() */