[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201007213159.1959308-17-mkl@pengutronix.de>
Date: Wed, 7 Oct 2020 23:31:58 +0200
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, linux-can@...r.kernel.org,
kernel@...gutronix.de, Srinivas Neeli <srinivas.neeli@...inx.com>,
Michal Simek <michal.simek@...inx.com>,
Marc Kleine-Budde <mkl@...gutronix.de>
Subject: [PATCH 16/17] can: xilinx_can: Check return value of set_reset_mode
From: Srinivas Neeli <srinivas.neeli@...inx.com>
Check return value of set_reset_mode() for error.
Addresses-Coverity: "check_return"
Signed-off-by: Srinivas Neeli <srinivas.neeli@...inx.com>
Signed-off-by: Michal Simek <michal.simek@...inx.com>
Link: https://lore.kernel.org/r/bac2c2b857986472a11db341b3f6f7a8905ad0dd.1600073396.git.michal.simek@xilinx.com
Signed-off-by: Marc Kleine-Budde <mkl@...gutronix.de>
---
drivers/net/can/xilinx_can.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
index d3c41e6c275d..9ea6ad73b07d 100644
--- a/drivers/net/can/xilinx_can.c
+++ b/drivers/net/can/xilinx_can.c
@@ -1369,9 +1369,13 @@ static irqreturn_t xcan_interrupt(int irq, void *dev_id)
static void xcan_chip_stop(struct net_device *ndev)
{
struct xcan_priv *priv = netdev_priv(ndev);
+ int ret;
/* Disable interrupts and leave the can in configuration mode */
- set_reset_mode(ndev);
+ ret = set_reset_mode(ndev);
+ if (ret < 0)
+ netdev_dbg(ndev, "set_reset_mode() Failed\n");
+
priv->can.state = CAN_STATE_STOPPED;
}
--
2.28.0
Powered by blists - more mailing lists