Skip to content

Commit 9d78ee4

Browse files
qianfengronggregkh
authored andcommitted
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>
1 parent 533656d commit 9d78ee4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/staging/gpib/gpio/gpib_bitbang.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ static irqreturn_t bb_SRQ_interrupt(int irq, void *arg)
726726
static int bb_command(struct gpib_board *board, u8 *buffer,
727727
size_t length, size_t *bytes_written)
728728
{
729-
size_t ret;
729+
int ret;
730730
struct bb_priv *priv = board->private_data;
731731
int i;
732732

0 commit comments

Comments
 (0)