mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 13:14:07 +08:00
net: wwan: iosm: Fix error handling path in ipc_pcie_probe()
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: 035e3befc1
("net: wwan: iosm: fix driver not working with INTEL_IOMMU disabled")
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9744d2bf19
commit
a56ef25619
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user