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

Commit c61a75ac authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller
Browse files

qed: use kzalloc instead of kmalloc and memset



Replace kmalloc followed by a memset with kzalloc

Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarAriel Elior <aelior@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0a833c29
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1277,11 +1277,10 @@ static struct qed_dcbx_get *qed_dcbnl_get_dcbx(struct qed_hwfn *hwfn,
{
	struct qed_dcbx_get *dcbx_info;

	dcbx_info = kmalloc(sizeof(*dcbx_info), GFP_ATOMIC);
	dcbx_info = kzalloc(sizeof(*dcbx_info), GFP_ATOMIC);
	if (!dcbx_info)
		return NULL;

	memset(dcbx_info, 0, sizeof(*dcbx_info));
	if (qed_dcbx_query_params(hwfn, dcbx_info, type)) {
		kfree(dcbx_info);
		return NULL;