Skip to content

Commit bf8d87c

Browse files
FirstLoveLifeLorenzo Pieralisi
authored andcommitted
PCI: endpoint: Fix misused goto label
Fix a misused goto label jump since that can result in a memory leak. Link: https://lore.kernel.org/r/17e7b9b9ee6.c6d9c6a02564.4545388417402742326@zohomail.com Signed-off-by: Li Chen <lchen@ambarella.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
1 parent 829cc0e commit bf8d87c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/pci/endpoint/functions/pci-epf-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ static int pci_epf_test_write(struct pci_epf_test *epf_test)
451451
if (!epf_test->dma_supported) {
452452
dev_err(dev, "Cannot transfer data using DMA\n");
453453
ret = -EINVAL;
454-
goto err_map_addr;
454+
goto err_dma_map;
455455
}
456456

457457
src_phys_addr = dma_map_single(dma_dev, buf, reg->size,

0 commit comments

Comments
 (0)