]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mfd: cgbc-core: Cleanup signedness in cgbc_session_request()
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 12 Mar 2025 08:34:50 +0000 (11:34 +0300)
committerLee Jones <lee@kernel.org>
Fri, 14 Mar 2025 11:48:03 +0000 (11:48 +0000)
This doesn't affect how the code works because there are some implicit
casts, but the "ret" variable is used to hold negative error codes so
it should be type int.

Declare it as "int" instead of "unsigned int".

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/9e812dfa-e216-4e40-bbf0-d0b63b110bb0@stanley.mountain
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/cgbc-core.c

index 85283c8dde253cf29056fc5fa4e086b5ac13a1fc..0b3788c2c1afdbaea13e88ab82b18d1160b16597 100644 (file)
@@ -96,7 +96,7 @@ static int cgbc_session_command(struct cgbc_device_data *cgbc, u8 cmd)
 
 static int cgbc_session_request(struct cgbc_device_data *cgbc)
 {
-       unsigned int ret;
+       int ret;
 
        ret = cgbc_wait_device(cgbc);