diff options
author | Srinivas Neeli <srinivas.neeli@xilinx.com> | 2020-09-14 10:49:57 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2020-10-07 23:18:34 +0200 |
commit | a61035c5a84bc92bffa4b252d1bc97034724667c (patch) | |
tree | f137a6d758b8a59b8dd7ca391e35ed4adc7e2fdd /drivers/net/can/xilinx_can.c | |
parent | 05ca14fdb6fe65614e0652d03e44b02748d25af7 (diff) | |
download | linux-a61035c5a84bc92bffa4b252d1bc97034724667c.tar.bz2 |
can: xilinx_can: Check return value of set_reset_mode
Check return value of set_reset_mode() for error.
Addresses-Coverity: "check_return"
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/bac2c2b857986472a11db341b3f6f7a8905ad0dd.1600073396.git.michal.simek@xilinx.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/xilinx_can.c')
-rw-r--r-- | drivers/net/can/xilinx_can.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; } |