* [PATCH] wifi: ath12k: Add missing unwind goto in ath12k_pci_probe()
@ 2023-03-07 10:47 Harshit Mogalapalli
2023-03-08 11:48 ` Simon Horman
2023-03-15 10:18 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Harshit Mogalapalli @ 2023-03-07 10:47 UTC (permalink / raw)
Cc: error27, Harshit Mogalapalli, Kalle Valo, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, P Praneesh,
Karthikeyan Periyasamy, Jeff Johnson, Bhagavathi Perumal S,
Wen Gong, ath12k, linux-wireless, netdev, linux-kernel
Smatch Warns:
drivers/net/wireless/ath/ath12k/pci.c:1198 ath12k_pci_probe()
warn: missing unwind goto?
Store the error value in ret and use correct label with a goto.
Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/all/Y+426q6cfkEdb5Bv@kili/
Suggested-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
---
Only Compile tested, found with Smatch.
---
drivers/net/wireless/ath/ath12k/pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath12k/pci.c b/drivers/net/wireless/ath/ath12k/pci.c
index ae7f6083c9fc..f523aa15885f 100644
--- a/drivers/net/wireless/ath/ath12k/pci.c
+++ b/drivers/net/wireless/ath/ath12k/pci.c
@@ -1195,7 +1195,8 @@ static int ath12k_pci_probe(struct pci_dev *pdev,
dev_err(&pdev->dev,
"Unknown hardware version found for QCN9274: 0x%x\n",
soc_hw_version_major);
- return -EOPNOTSUPP;
+ ret = -EOPNOTSUPP;
+ goto err_pci_free_region;
}
break;
case WCN7850_DEVICE_ID:
--
2.38.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] wifi: ath12k: Add missing unwind goto in ath12k_pci_probe()
2023-03-07 10:47 [PATCH] wifi: ath12k: Add missing unwind goto in ath12k_pci_probe() Harshit Mogalapalli
@ 2023-03-08 11:48 ` Simon Horman
2023-03-15 10:18 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2023-03-08 11:48 UTC (permalink / raw)
To: Harshit Mogalapalli
Cc: error27, Kalle Valo, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, P Praneesh, Karthikeyan Periyasamy,
Jeff Johnson, Bhagavathi Perumal S, Wen Gong, ath12k,
linux-wireless, netdev, linux-kernel
On Tue, Mar 07, 2023 at 02:47:06AM -0800, Harshit Mogalapalli wrote:
> Smatch Warns:
> drivers/net/wireless/ath/ath12k/pci.c:1198 ath12k_pci_probe()
> warn: missing unwind goto?
>
> Store the error value in ret and use correct label with a goto.
>
> Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
> Reported-by: Dan Carpenter <error27@gmail.com>
> Link: https://lore.kernel.org/all/Y+426q6cfkEdb5Bv@kili/
> Suggested-by: Dan Carpenter <error27@gmail.com>
> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
> ---
> Only Compile tested, found with Smatch.
Reviewed-by: Simon Horman <simon.horman@corigine.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] wifi: ath12k: Add missing unwind goto in ath12k_pci_probe()
2023-03-07 10:47 [PATCH] wifi: ath12k: Add missing unwind goto in ath12k_pci_probe() Harshit Mogalapalli
2023-03-08 11:48 ` Simon Horman
@ 2023-03-15 10:18 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2023-03-15 10:18 UTC (permalink / raw)
To: Harshit Mogalapalli
Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> wrote:
> Smatch Warns:
> drivers/net/wireless/ath/ath12k/pci.c:1198 ath12k_pci_probe()
> warn: missing unwind goto?
>
> Store the error value in ret and use correct label with a goto.
>
> Only Compile tested, found with Smatch.
>
> Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
> Reported-by: Dan Carpenter <error27@gmail.com>
> Link: https://lore.kernel.org/all/Y+426q6cfkEdb5Bv@kili/
> Suggested-by: Dan Carpenter <error27@gmail.com>
> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
> Reviewed-by: Simon Horman <simon.horman@corigine.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Patch applied to ath-next branch of ath.git, thanks.
488d9a484f96 wifi: ath12k: Add missing unwind goto in ath12k_pci_probe()
--
https://patchwork.kernel.org/project/linux-wireless/patch/20230307104706.240119-1-harshit.m.mogalapalli@oracle.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-15 10:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-07 10:47 [PATCH] wifi: ath12k: Add missing unwind goto in ath12k_pci_probe() Harshit Mogalapalli
2023-03-08 11:48 ` Simon Horman
2023-03-15 10:18 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).