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

Commit 0234961d authored by Hariprasad Kelam's avatar Hariprasad Kelam Committed by Greg Kroah-Hartman
Browse files

staging: rtl8712: rtl87x_io : make use of kzalloc



kmalloc followed by memset can be replaced with kzalloc.

Signed-off-by: default avatarHariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1011f2b0
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -107,13 +107,11 @@ uint r8712_alloc_io_queue(struct _adapter *adapter)
	INIT_LIST_HEAD(&pio_queue->processing);
	INIT_LIST_HEAD(&pio_queue->pending);
	spin_lock_init(&pio_queue->lock);
	pio_queue->pallocated_free_ioreqs_buf = kmalloc(NUM_IOREQ *
	pio_queue->pallocated_free_ioreqs_buf = kzalloc(NUM_IOREQ *
						(sizeof(struct io_req)) + 4,
						GFP_ATOMIC);
	if ((pio_queue->pallocated_free_ioreqs_buf) == NULL)
		goto alloc_io_queue_fail;
	memset(pio_queue->pallocated_free_ioreqs_buf, 0,
			(NUM_IOREQ * (sizeof(struct io_req)) + 4));
	pio_queue->free_ioreqs_buf = pio_queue->pallocated_free_ioreqs_buf + 4
			- ((addr_t)(pio_queue->pallocated_free_ioreqs_buf)
			& 3);