mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-16 07:35:14 +00:00
can: hi311x: fix a signedness bug in hi3110_cmd()
[ Upstream commitf6b3c7848e
] 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:57e83fb9b7
("can: hi311x: Add Holt HI-311x CAN driver") Link: https://lore.kernel.org/r/20210729141246.GA1267@kili Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
6bee388566
commit
5a6c550c2f
1 changed files with 1 additions and 1 deletions
|
@ -236,7 +236,7 @@ static int hi3110_spi_trans(struct spi_device *spi, int len)
|
|||
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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue