diff options
author | Qianfeng Rong <rongqianfeng@vivo.com> | 2025-08-26 20:32:01 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-09-06 15:55:35 +0200 |
commit | 9d78ee44a9d717db66156f40856f201c8618f2b0 (patch) | |
tree | 9b03e96329989d94fd14741d38e2e6e6b9dc994f | |
parent | 533656d39ffd2468266de5e28bc2c340c230b66d (diff) |
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>
-rw-r--r-- | drivers/staging/gpib/gpio/gpib_bitbang.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/gpib/gpio/gpib_bitbang.c b/drivers/staging/gpib/gpio/gpib_bitbang.c index 22a55f3f794d..374cd61355e9 100644 --- a/drivers/staging/gpib/gpio/gpib_bitbang.c +++ b/drivers/staging/gpib/gpio/gpib_bitbang.c @@ -726,7 +726,7 @@ static irqreturn_t bb_SRQ_interrupt(int irq, void *arg) static int bb_command(struct gpib_board *board, u8 *buffer, size_t length, size_t *bytes_written) { - size_t ret; + int ret; struct bb_priv *priv = board->private_data; int i; |