]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
staging: gpib: use int type to store negative error codes
authorQianfeng Rong <rongqianfeng@vivo.com>
Tue, 26 Aug 2025 12:32:01 +0000 (20:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Sep 2025 13:55:35 +0000 (15:55 +0200)
commit9d78ee44a9d717db66156f40856f201c8618f2b0
tree9b03e96329989d94fd14741d38e2e6e6b9dc994f
parent533656d39ffd2468266de5e28bc2c340c230b66d
staging: gpib: use int type to store negative error codes

The "ret" variable is used to store the return from bb_write() returns
either zero on success or negative error codes on failure.  Storing the
error codes in size_t which is an unsigned long, doesn't cause an issue
at runtime but it's ugly as pants.  Change "ret" from size_t to int
type.  No effect on runtime.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20250826123208.300145-1-rongqianfeng@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gpib/gpio/gpib_bitbang.c