diff options
| author | Fabian Frederick <fabf@skynet.be> | 2014-05-26 21:32:42 +0200 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-11 11:00:13 +0200 |
| commit | be127be3812a98ddad782bdab32d4e0a12905dc9 (patch) | |
| tree | 2d4771e1d3435eec225e9834e1fca0ddf5dd0283 | |
| parent | 564a35e24c414e21693c13660242e634d284a168 (diff) | |
drivers/tty/n_hdlc.c: replace kmalloc/memset by kzalloc
Change-Id: Ie5a8c08ec3e1cdaada7f9c9181730ff4a353ee97
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/tty/n_hdlc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/tty/n_hdlc.c b/drivers/tty/n_hdlc.c index 66fb07684..92f04be11 100644 --- a/drivers/tty/n_hdlc.c +++ b/drivers/tty/n_hdlc.c @@ -836,13 +836,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)); - 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); |
