]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: wwan: iosm: use int type to store negative error codes
authorQianfeng Rong <rongqianfeng@vivo.com>
Tue, 26 Aug 2025 13:50:19 +0000 (21:50 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 28 Aug 2025 01:17:15 +0000 (18:17 -0700)
The 'ret' variable in ipc_pcie_resources_request() either stores '-EBUSY'
directly or holds returns from pci_request_regions() and ipc_acquire_irq().
Storing negative error codes in u32 causes no runtime issues but is
stylistically inconsistent and very ugly.  Change 'ret' from u32 to int
type - this has no runtime impact.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Reviewed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Link: https://patch.msgid.link/20250826135021.510767-1-rongqianfeng@vivo.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/wwan/iosm/iosm_ipc_pcie.c

index a066977af0be5c8abb96d0220c65eaf0293a05b8..08ff0d6ccfab1f035c7733c3b6d8163c51e6b1b5 100644 (file)
@@ -69,7 +69,7 @@ static int ipc_pcie_resources_request(struct iosm_pcie *ipc_pcie)
 {
        struct pci_dev *pci = ipc_pcie->pci;
        u32 cap = 0;
-       u32 ret;
+       int ret;
 
        /* Reserved PCI I/O and memory resources.
         * Mark all PCI regions associated with PCI device pci as