From 2591c280c375c547022eb619895c1aebbbc38219 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Sun, 4 Sep 2016 14:24:03 -0700 Subject: qed: Remove OOM messages These messages are unnecessary as OOM allocation failures already do a dump_stack() giving more or less the same information. $ size drivers/net/ethernet/qlogic/qed/built-in.o* (defconfig x86-64) text data bss dec hex filename 127817 27969 32800 188586 2e0aa drivers/net/ethernet/qlogic/qed/built-in.o.new 132474 27969 32800 193243 2f2db drivers/net/ethernet/qlogic/qed/built-in.o.old Miscellanea: o Change allocs to the generally preferred forms where possible. Signed-off-by: Joe Perches Signed-off-by: David S. Miller --- drivers/net/ethernet/qlogic/qed/qed_vf.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'drivers/net/ethernet/qlogic/qed/qed_vf.c') diff --git a/drivers/net/ethernet/qlogic/qed/qed_vf.c b/drivers/net/ethernet/qlogic/qed/qed_vf.c index 3c9071de5472..de0acbcaf85c 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_vf.c +++ b/drivers/net/ethernet/qlogic/qed/qed_vf.c @@ -331,31 +331,23 @@ int qed_vf_hw_prepare(struct qed_hwfn *p_hwfn) /* Allocate vf sriov info */ p_iov = kzalloc(sizeof(*p_iov), GFP_KERNEL); - if (!p_iov) { - DP_NOTICE(p_hwfn, "Failed to allocate `struct qed_sriov'\n"); + if (!p_iov) return -ENOMEM; - } /* Allocate vf2pf msg */ p_iov->vf2pf_request = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, sizeof(union vfpf_tlvs), &p_iov->vf2pf_request_phys, GFP_KERNEL); - if (!p_iov->vf2pf_request) { - DP_NOTICE(p_hwfn, - "Failed to allocate `vf2pf_request' DMA memory\n"); + if (!p_iov->vf2pf_request) goto free_p_iov; - } p_iov->pf2vf_reply = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, sizeof(union pfvf_tlvs), &p_iov->pf2vf_reply_phys, GFP_KERNEL); - if (!p_iov->pf2vf_reply) { - DP_NOTICE(p_hwfn, - "Failed to allocate `pf2vf_reply' DMA memory\n"); + if (!p_iov->pf2vf_reply) goto free_vf2pf_request; - } DP_VERBOSE(p_hwfn, QED_MSG_IOV, -- cgit v1.2.3