Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e25f8ce authored by Fabian Frederick's avatar Fabian Frederick Committed by Greg Kroah-Hartman
Browse files

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



Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cec5b2a9
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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);