linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: linux-kernel@vger.kernel.org, monstr@monstr.eu,
	michal.simek@xilinx.com, git@xilinx.com
Cc: Srinivas Neeli <srinivas.neeli@xilinx.com>,
	Appana Durga Kedareswara rao <appana.durga.rao@xilinx.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	Naga Sureshkumar Relli <naga.sureshkumar.relli@xilinx.com>,
	Wolfgang Grandegger <wg@grandegger.com>,
	linux-arm-kernel@lists.infradead.org, linux-can@vger.kernel.org,
	netdev@vger.kernel.org
Subject: [PATCH 2/3] can: xilinx_can: Check return value of set_reset_mode
Date: Mon, 14 Sep 2020 10:49:57 +0200	[thread overview]
Message-ID: <bac2c2b857986472a11db341b3f6f7a8905ad0dd.1600073396.git.michal.simek@xilinx.com> (raw)
In-Reply-To: <cover.1600073396.git.michal.simek@xilinx.com>

From: Srinivas Neeli <srinivas.neeli@xilinx.com>

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

 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 f4b544b69646..3393e2a73e15 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


  parent reply	other threads:[~2020-09-14  8:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-14  8:49 [PATCH 0/3] can: xilinx_can: Some minor changes Michal Simek
2020-09-14  8:49 ` [PATCH 1/3] can: xilinx_can: Limit CANFD brp to 2 Michal Simek
2020-09-14  8:49 ` Michal Simek [this message]
2020-09-14  8:49 ` [PATCH 3/3] can: xilinx_can: Fix incorrect variable and initialize with a default value Michal Simek
2020-10-06 19:34 ` [PATCH 0/3] can: xilinx_can: Some minor changes Marc Kleine-Budde

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=bac2c2b857986472a11db341b3f6f7a8905ad0dd.1600073396.git.michal.simek@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=appana.durga.rao@xilinx.com \
    --cc=davem@davemloft.net \
    --cc=git@xilinx.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=monstr@monstr.eu \
    --cc=naga.sureshkumar.relli@xilinx.com \
    --cc=netdev@vger.kernel.org \
    --cc=srinivas.neeli@xilinx.com \
    --cc=wg@grandegger.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).