kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] can: hi311x: fix a signedness bug in hi3110_cmd()
@ 2021-07-29 14:12 Dan Carpenter
  2021-07-30  6:48 ` Marc Kleine-Budde
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-07-29 14:12 UTC (permalink / raw)
  To: Wolfgang Grandegger
  Cc: Marc Kleine-Budde, David S. Miller, Jakub Kicinski,
	Vincent Mailhol, Oliver Hartkopp, Akshay Bhat, linux-can, netdev,
	kernel-janitors

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: 57e83fb9b746 ("can: hi311x: Add Holt HI-311x CAN driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/net/can/spi/hi311x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/spi/hi311x.c b/drivers/net/can/spi/hi311x.c
index dd17b8c53e1c..89d9c986a229 100644
--- a/drivers/net/can/spi/hi311x.c
+++ b/drivers/net/can/spi/hi311x.c
@@ -218,7 +218,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);
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] can: hi311x: fix a signedness bug in hi3110_cmd()
  2021-07-29 14:12 [PATCH net] can: hi311x: fix a signedness bug in hi3110_cmd() Dan Carpenter
@ 2021-07-30  6:48 ` Marc Kleine-Budde
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2021-07-30  6:48 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Wolfgang Grandegger, David S. Miller, Jakub Kicinski,
	Vincent Mailhol, Oliver Hartkopp, Akshay Bhat, linux-can, netdev,
	kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 673 bytes --]

On 29.07.2021 17:12:46, Dan Carpenter wrote:
> 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: 57e83fb9b746 ("can: hi311x: Add Holt HI-311x CAN driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied to linux-can/testing.

Thanks,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-30  6:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-29 14:12 [PATCH net] can: hi311x: fix a signedness bug in hi3110_cmd() Dan Carpenter
2021-07-30  6:48 ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).