From 6a981ab712b67a8193de93960e74fd4ad0e1a839 Mon Sep 17 00:00:00 2001 From: Nagarjuna Kristam Date: Tue, 16 May 2023 15:18:33 +0530 Subject: [PATCH] PCI: EPF: dma-test: Fix Coevrity issues Fix coverity issue of dead code and unreachable code. Bug 3952896 Signed-off-by: Nagarjuna Kristam Change-Id: I6ca4b485f6b053ea6787b76f3fae95d8f6914c98 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2905249 Reviewed-by: svcacv Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-cert Reviewed-by: Manikanta Maddireddy Reviewed-by: Bitan Biswas GVS: Gerrit_Virtual_Submit --- drivers/pci/endpoint/functions/pci-epf-dma-test.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/pci/endpoint/functions/pci-epf-dma-test.c b/drivers/pci/endpoint/functions/pci-epf-dma-test.c index e580d1d7..ac5fdc17 100644 --- a/drivers/pci/endpoint/functions/pci-epf-dma-test.c +++ b/drivers/pci/endpoint/functions/pci-epf-dma-test.c @@ -2,7 +2,7 @@ /* * PCIe DMA EPF test framework for Tegra PCIe * - * Copyright (C) 2021-2022 NVIDIA Corporation. All rights reserved. + * Copyright (C) 2021-2023 NVIDIA Corporation. All rights reserved. */ #include @@ -1348,11 +1348,11 @@ wr2_task: wr1_task: kthread_stop(epfnv->wr0_task); wr0_task: -#endif epfnv->async_dma = false; epfnv->task_done = 0; return 0; +#endif } static void init_debugfs(struct pcie_epf_dma *epfnv) @@ -1699,9 +1699,6 @@ static int pcie_dma_epf_probe(struct pci_epf *epf) epfnv->edma.ll_desc = devm_kzalloc(dev, sizeof(*epfnv->ll_desc) * NUM_EDMA_DESC, GFP_KERNEL); - if (!epfnv) - return -ENOMEM; - gepfnv = epfnv; epf_set_drvdata(epf, epfnv);