PCI: endpoint: Fix misused goto label

[ Upstream commit bf8d87c076 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Li Chen 2022-01-21 15:48:23 +08:00 коммит произвёл Greg Kroah-Hartman
Родитель b6d4b322da
Коммит dc9d33b2d8
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -451,7 +451,7 @@ static int pci_epf_test_write(struct pci_epf_test *epf_test)
if (!epf_test->dma_supported) {
dev_err(dev, "Cannot transfer data using DMA\n");
ret = -EINVAL;
goto err_map_addr;
goto err_dma_map;
}
src_phys_addr = dma_map_single(dma_dev, buf, reg->size,