2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-18 02:04:05 +08:00

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>
This commit is contained in:
Fabian Frederick 2014-05-26 21:32:42 +02:00 committed by Greg Kroah-Hartman
parent cec5b2a97a
commit 8e25f8ce0e

View File

@ -848,13 +848,11 @@ static struct n_hdlc *n_hdlc_alloc(void)
{ {
struct n_hdlc_buf *buf; struct n_hdlc_buf *buf;
int i; 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) if (!n_hdlc)
return NULL; return NULL;
memset(n_hdlc, 0, sizeof(*n_hdlc));
n_hdlc_buf_list_init(&n_hdlc->rx_free_buf_list); n_hdlc_buf_list_init(&n_hdlc->rx_free_buf_list);
n_hdlc_buf_list_init(&n_hdlc->tx_free_buf_list); n_hdlc_buf_list_init(&n_hdlc->tx_free_buf_list);
n_hdlc_buf_list_init(&n_hdlc->rx_buf_list); n_hdlc_buf_list_init(&n_hdlc->rx_buf_list);