summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-11-15 17:03:20 +0300
committerDavid S. Miller <davem@davemloft.net>2017-11-16 04:49:00 +0300
commitc61a75ac1a768b8eec34da95c958f6406685faef (patch)
treeed64e19eb51a7bb650196213343a05fb40be8ffe /drivers/net/ethernet/qlogic/qed/qed_dcbx.c
parent0a833c29d89656025443cb9f0ebff7052dd95ce0 (diff)
downloadlinux-c61a75ac1a768b8eec34da95c958f6406685faef.tar.xz
qed: use kzalloc instead of kmalloc and memset
Replace kmalloc followed by a memset with kzalloc Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Ariel Elior <aelior@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_dcbx.c')
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_dcbx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
index 6e15d3c10ebf..fe7c1f230028 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
@@ -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;