]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
scsi: pm8001: Use int instead of u32 to store error codes
authorQianfeng Rong <rongqianfeng@vivo.com>
Tue, 26 Aug 2025 09:32:42 +0000 (17:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:10 +0000 (15:37 -0500)
[ Upstream commit bee3554d1a4efbce91d6eca732f41b97272213a5 ]

Use int instead of u32 for 'ret' variable to store negative error codes
returned by PM8001_CHIP_DISP->set_nvmd_req().

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Link: https://lore.kernel.org/r/20250826093242.230344-1-rongqianfeng@vivo.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/pm8001/pm8001_ctl.c

index 0c96875cf8fd1799397d2e12c538222d52c36f69..cbfda8c04e956a3e7175dabdc15a235fcc6bba08 100644 (file)
@@ -682,7 +682,7 @@ static int pm8001_set_nvmd(struct pm8001_hba_info *pm8001_ha)
        struct pm8001_ioctl_payload     *payload;
        DECLARE_COMPLETION_ONSTACK(completion);
        u8              *ioctlbuffer;
-       u32             ret;
+       int             ret;
        u32             length = 1024 * 5 + sizeof(*payload) - 1;
 
        if (pm8001_ha->fw_image->size > 4096) {