Skip to content

Commit f6b3c78

Browse files
Dan Carpentermarckleinebudde
authored andcommitted
can: hi311x: fix a signedness bug in hi3110_cmd()
The hi3110_cmd() is supposed to return zero on success and negative error codes on failure, but it was accidentally declared as a u8 when it needs to be an int type. Fixes: 57e83fb ("can: hi311x: Add Holt HI-311x CAN driver") Link: https://lore.kernel.org/r/20210729141246.GA1267@kili Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent 8a7b46f commit f6b3c78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/can/spi/hi311x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ static int hi3110_spi_trans(struct spi_device *spi, int len)
218218
return ret;
219219
}
220220

221-
static u8 hi3110_cmd(struct spi_device *spi, u8 command)
221+
static int hi3110_cmd(struct spi_device *spi, u8 command)
222222
{
223223
struct hi3110_priv *priv = spi_get_drvdata(spi);
224224

0 commit comments

Comments
 (0)