diff --git a/patches.kernel.org/6.2.12-064-net-wwan-iosm-Fix-error-handling-path-in-ipc_p.patch b/patches.kernel.org/6.2.12-064-net-wwan-iosm-Fix-error-handling-path-in-ipc_p.patch new file mode 100644 index 0000000..e61c9f8 --- /dev/null +++ b/patches.kernel.org/6.2.12-064-net-wwan-iosm-Fix-error-handling-path-in-ipc_p.patch @@ -0,0 +1,57 @@ +From: Harshit Mogalapalli +Date: Sat, 8 Apr 2023 12:43:21 -0700 +Subject: [PATCH] net: wwan: iosm: Fix error handling path in ipc_pcie_probe() +References: bsc#1012628 +Patch-mainline: 6.2.12 +Git-commit: a56ef25619e079bd7d744636cf18d054d1e91982 + +[ Upstream commit a56ef25619e079bd7d744636cf18d054d1e91982 ] + +Smatch reports: + drivers/net/wwan/iosm/iosm_ipc_pcie.c:298 ipc_pcie_probe() + warn: missing unwind goto? + +When dma_set_mask fails it directly returns without disabling pci +device and freeing ipc_pcie. Fix this my calling a correct goto label + +As dma_set_mask returns either 0 or -EIO, we can use a goto label, as +it finally returns -EIO. + +Add a set_mask_fail goto label which stands consistent with other goto +labels in this function.. + +Fixes: 035e3befc191 ("net: wwan: iosm: fix driver not working with INTEL_IOMMU disabled") +Reviewed-by: Simon Horman +Signed-off-by: Harshit Mogalapalli +Reviewed-by: Simon Horman +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +Signed-off-by: Jiri Slaby +--- + drivers/net/wwan/iosm/iosm_ipc_pcie.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/wwan/iosm/iosm_ipc_pcie.c b/drivers/net/wwan/iosm/iosm_ipc_pcie.c +index 5bf5a939..04517bd3 100644 +--- a/drivers/net/wwan/iosm/iosm_ipc_pcie.c ++++ b/drivers/net/wwan/iosm/iosm_ipc_pcie.c +@@ -295,7 +295,7 @@ static int ipc_pcie_probe(struct pci_dev *pci, + ret = dma_set_mask(ipc_pcie->dev, DMA_BIT_MASK(64)); + if (ret) { + dev_err(ipc_pcie->dev, "Could not set PCI DMA mask: %d", ret); +- return ret; ++ goto set_mask_fail; + } + + ipc_pcie_config_aspm(ipc_pcie); +@@ -323,6 +323,7 @@ static int ipc_pcie_probe(struct pci_dev *pci, + imem_init_fail: + ipc_pcie_resources_release(ipc_pcie); + resources_req_fail: ++set_mask_fail: + pci_disable_device(pci); + pci_enable_fail: + kfree(ipc_pcie); +-- +2.35.3 + diff --git a/series.conf b/series.conf index 039154c..143c03a 100644 --- a/series.conf +++ b/series.conf @@ -2291,6 +2291,7 @@ patches.kernel.org/6.2.12-061-drm-armada-Fix-a-potential-double-free-in-an-e.patch patches.kernel.org/6.2.12-062-qlcnic-check-pci_reset_function-result.patch patches.kernel.org/6.2.12-063-smc-Fix-use-after-free-in-tcp_write_timer_hand.patch + patches.kernel.org/6.2.12-064-net-wwan-iosm-Fix-error-handling-path-in-ipc_p.patch ######################################################## # Build fixes that apply to the vanilla kernel too.