Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, linux-can@vger.kernel.org,
	kernel@pengutronix.de, Dan Carpenter <dan.carpenter@oracle.com>,
	Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH net 2/6] can: hi311x: fix a signedness bug in hi3110_cmd()
Date: Fri, 30 Jul 2021 09:05:22 +0200	[thread overview]
Message-ID: <20210730070526.1699867-3-mkl@pengutronix.de> (raw)
In-Reply-To: <20210730070526.1699867-1-mkl@pengutronix.de>

From: Dan Carpenter <dan.carpenter@oracle.com>

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")
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>
---
 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.30.2



  parent reply	other threads:[~2021-07-30  7:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30  7:05 pull-request: can 2021-07-30 Marc Kleine-Budde
2021-07-30  7:05 ` [PATCH net 1/6] MAINTAINERS: add Yasushi SHOJI as reviewer for the Microchip CAN BUS Analyzer Tool driver Marc Kleine-Budde
2021-07-30  7:05 ` Marc Kleine-Budde [this message]
2021-07-30  7:05 ` [PATCH net 3/6] can: mcba_usb_start(): add missing urb->transfer_dma initialization Marc Kleine-Budde
2021-07-30  7:05 ` [PATCH net 4/6] can: usb_8dev: fix memory leak Marc Kleine-Budde
2021-07-30 17:32   ` Jakub Kicinski
2021-07-30  7:05 ` [PATCH net 5/6] can: ems_usb: " Marc Kleine-Budde
2021-07-30  7:05 ` [PATCH net 6/6] can: esd_usb2: " Marc Kleine-Budde
2021-07-30 17:33 ` pull-request: can 2021-07-30 Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210730070526.1699867-3-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=dan.carpenter@oracle.com \
    --cc=davem@davemloft.net \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [PATCH net 2/6] can: hi311x: fix a signedness bug in hi3110_cmd()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).