Commit f6b3c784 authored by Dan Carpenter's avatar Dan Carpenter Committed by Marc Kleine-Budde

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: 57e83fb9 ("can: hi311x: Add Holt HI-311x CAN driver")
Link: https://lore.kernel.org/r/20210729141246.GA1267@kiliSigned-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 8a7b46fa
...@@ -218,7 +218,7 @@ static int hi3110_spi_trans(struct spi_device *spi, int len) ...@@ -218,7 +218,7 @@ static int hi3110_spi_trans(struct spi_device *spi, int len)
return ret; return ret;
} }
static u8 hi3110_cmd(struct spi_device *spi, u8 command) static int hi3110_cmd(struct spi_device *spi, u8 command)
{ {
struct hi3110_priv *priv = spi_get_drvdata(spi); struct hi3110_priv *priv = spi_get_drvdata(spi);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment