Commit a61035c5 authored by Srinivas Neeli's avatar Srinivas Neeli Committed by Marc Kleine-Budde

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: default avatarSrinivas Neeli <srinivas.neeli@xilinx.com>
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/bac2c2b857986472a11db341b3f6f7a8905ad0dd.1600073396.git.michal.simek@xilinx.comSigned-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 05ca14fd
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment