aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-05-26 15:32:42 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-28 16:33:18 -0400
commit8e25f8ce0e3227f20090f1b89b908d8146304413 (patch)
treeebd73224ac7dc3ad5c5472c9d4e69ccec577522e /drivers/tty
parentcec5b2a97a11ade56a701e83044d0a2a984c67b4 (diff)
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>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/n_hdlc.c4
1 files changed, 1 insertions, 3 deletions
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)
848{ 848{
849 struct n_hdlc_buf *buf; 849 struct n_hdlc_buf *buf;
850 int i; 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 if (!n_hdlc) 853 if (!n_hdlc)
854 return NULL; 854 return NULL;
855 855
856 memset(n_hdlc, 0, sizeof(*n_hdlc));
857
858 n_hdlc_buf_list_init(&n_hdlc->rx_free_buf_list); 856 n_hdlc_buf_list_init(&n_hdlc->rx_free_buf_list);
859 n_hdlc_buf_list_init(&n_hdlc->tx_free_buf_list); 857 n_hdlc_buf_list_init(&n_hdlc->tx_free_buf_list);
860 n_hdlc_buf_list_init(&n_hdlc->rx_buf_list); 858 n_hdlc_buf_list_init(&n_hdlc->rx_buf_list);