Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Li Chen and committed by
Lorenzo Pieralisi
bf8d87c0 829cc0e2

+1 -1
+1 -1
drivers/pci/endpoint/functions/pci-epf-test.c
··· 451 451 if (!epf_test->dma_supported) { 452 452 dev_err(dev, "Cannot transfer data using DMA\n"); 453 453 ret = -EINVAL; 454 - goto err_map_addr; 454 + goto err_dma_map; 455 455 } 456 456 457 457 src_phys_addr = dma_map_single(dma_dev, buf, reg->size,