Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/tty/n_hdlc.c: replace kmalloc/memset by kzalloc

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Fabian Frederick and committed by
Greg Kroah-Hartman
8e25f8ce cec5b2a9

+1 -3
+1 -3
drivers/tty/n_hdlc.c
··· 848 848 { 849 849 struct n_hdlc_buf *buf; 850 850 int i; 851 - struct n_hdlc *n_hdlc = kmalloc(sizeof(*n_hdlc), GFP_KERNEL); 851 + struct n_hdlc *n_hdlc = kzalloc(sizeof(*n_hdlc), GFP_KERNEL); 852 852 853 853 if (!n_hdlc) 854 854 return NULL; 855 - 856 - memset(n_hdlc, 0, sizeof(*n_hdlc)); 857 855 858 856 n_hdlc_buf_list_init(&n_hdlc->rx_free_buf_list); 859 857 n_hdlc_buf_list_init(&n_hdlc->tx_free_buf_list);