]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
qed: Remove useless set memory to zero use memset()
authorWei Yongjun <weiyongjun1@huawei.com>
Tue, 18 Oct 2016 15:54:50 +0000 (15:54 +0000)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 6 Mar 2017 05:00:00 +0000 (21:00 -0800)
Orabug: 25477939

The memory return by kzalloc() has already be set to zero, so
remove useless memset(0).

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 4251e7475d4b2ac0d9ad039439ad0650921b1d27)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/qlogic/qed/qed_roce.c

index f3a825a8f8d52dda6aff03074e61c830370d0594..6a353ffb87a494117e62cb65a2dda056bc1cf648 100644 (file)
@@ -2658,7 +2658,6 @@ static int qed_roce_ll2_start(struct qed_dev *cdev,
                DP_ERR(cdev, "qed roce ll2 start: failed memory allocation\n");
                return -ENOMEM;
        }
-       memset(roce_ll2, 0, sizeof(*roce_ll2));
        roce_ll2->handle = QED_LL2_UNUSED_HANDLE;
        roce_ll2->cbs = params->cbs;
        roce_ll2->cb_cookie = params->cb_cookie;