]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: wwan: iosm: Fix error handling path in ipc_pcie_probe()
authorHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Sat, 8 Apr 2023 19:43:21 +0000 (12:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Apr 2023 10:35:09 +0000 (12:35 +0200)
commiteabf778f9b219477d77d5acf3cd7be0f1b6c8934
tree69ae738ce5eedfa82f5458916b52f8aa2a80cdae
parentf517b5ee826a8897641f7cd682ec7e173f5f3c39
net: wwan: iosm: Fix error handling path in ipc_pcie_probe()

[ 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 <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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wwan/iosm/iosm_ipc_pcie.c