From: Fabian Frederick Date: Mon, 26 May 2014 19:32:42 +0000 (+0200) Subject: drivers/tty/n_hdlc.c: replace kmalloc/memset by kzalloc X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=8e25f8ce0e3227f20090f1b89b908d8146304413;p=deliverable%2Flinux.git drivers/tty/n_hdlc.c: replace kmalloc/memset by kzalloc Cc: Greg Kroah-Hartman Signed-off-by: Fabian Frederick Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/n_hdlc.c b/drivers/tty/n_hdlc.c index ef42942a9390..644ddb841d9f 100644 --- a/drivers/tty/n_hdlc.c +++ b/drivers/tty/n_hdlc.c @@ -848,13 +848,11 @@ static struct n_hdlc *n_hdlc_alloc(void) { 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)); - 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->rx_buf_list);