From patchwork Mon Sep 14 08:49:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 11773289 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8DF02618 for ; Mon, 14 Sep 2020 08:50:28 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 58FB6206DC for ; Mon, 14 Sep 2020 08:50:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oReTCfZT"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="ggbwbppV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 58FB6206DC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2f5QwdoMaoeXjYTTp2QnplPiJoVZSiICUNQBREbXPmo=; b=oReTCfZTCtRI49tfVRhpyEgM8 RKK305NLwHP6NQMPiI/lQxZ7Cp1Gse6LEO+w3/Ek//ySQVQD8RFix73Jf+bTxwSFkYpGm9HwQwPe+ uJNiWDutjjeaiuRBKElkIGwkzdg5pG7hTz5oVfEBUog6hjynFtSPNGR8YFfpnJv597fFwjjOB/hc0 VB5LUcX9GbQwx6q9iL2PsuG9V/1HNcHAGc+b0MM1Hdf83gKDKVtKWnZJq+PIb+Yztm/begM8aXRSl lYaZ2dT2OYpG6BS8NGM+nXCaRjp8ndIhaZbsANJaLM+yg8ReVYpyQbyi2cp9XNONgT09wlb8JsuD7 jsqXwroTw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHkBm-00083W-2I; Mon, 14 Sep 2020 08:50:18 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHkBb-00080c-PK for linux-arm-kernel@lists.infradead.org; Mon, 14 Sep 2020 08:50:08 +0000 Received: by mail-wr1-x444.google.com with SMTP id z1so17763765wrt.3 for ; Mon, 14 Sep 2020 01:50:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Tnhr79mi4DKCMRU16Knp1ByZEtd2oOyfWvrEsPnasz0=; b=ggbwbppVHTxdFbCi0nMw/1Da6Zuoa6rODfIkC4FE1354F9DP6tyBWSrzqrTfGrfQX3 Gj3UYObzDxfj8+PrK/feQQLBRLx2I/GYO7OxagaLX5SDn+e1/8CtiTGKL59uCWEoQQmq DYzsdbhUUPe/7aPlqDxd4heNSLaTOKiErKd2BoSsiDPjtlFfnJA50MOiIkWliA8UVtHp 8/P9G4uvJdQ0msLNBk0ougfo/eJmMaE6b9P33WjgAgNkaw6Y2QIf5lLK290s265Zi9v9 FRhQriOKoyy+3IdK3pL5mqov96frfb4LELX34Inb/XDcOLQ47joFRAwjqMBknsUNPOaz vW0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Tnhr79mi4DKCMRU16Knp1ByZEtd2oOyfWvrEsPnasz0=; b=azj8xM2PinL87eJ5bRCoLDDSg9cCho8fTFCZQH6CpaC+eVbD4qG5JEJuUv6goWJLRT ehB4Ro1D5XWAF0hx3R41Vi6AyqBJOpjAvd0gDvh1N9ptLZzM0srGHWaVaLK4coKCqGDn xhDsD/Hrogxm4YEwBghBvi5ql9rTmk6m/+vFqIUBE/LSwdNnEo3Hnq/jB2x84oxMQFPC 2wcf3UB9M8KovhbJ3QCsUCLkcl+RfNX7Z8/O0eEsgQKwALdeqjxcWP/g+BcqdIRQYYxB n1v35iEwC/DSQxqqY8LorkEXIfg8VUa4yKbDvadavwaDi+SLT84qa71fcptdqOtBQIVI BgJA== X-Gm-Message-State: AOAM531A3irfZReSIQ1Q3VofkFAWgXz3dvqRnpYNraLNgMsnfBoZoRCH 0EwB2DQLURWrdE+mWlvFg4ulRw== X-Google-Smtp-Source: ABdhPJwNn8yyjbVS7CEijF6HJmDzLprYpyLbe3fkcIfXlK11CXthgCbgprAuNq7BPa8a1yvOLYbL6A== X-Received: by 2002:adf:bb8c:: with SMTP id q12mr14828713wrg.393.1600073406766; Mon, 14 Sep 2020 01:50:06 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id w21sm19324776wmk.34.2020.09.14.01.50.06 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Sep 2020 01:50:06 -0700 (PDT) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu, michal.simek@xilinx.com, git@xilinx.com Subject: [PATCH 2/3] can: xilinx_can: Check return value of set_reset_mode Date: Mon, 14 Sep 2020 10:49:57 +0200 Message-Id: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200914_045007_869530_836CEC14 X-CRM114-Status: GOOD ( 15.50 ) X-Spam-Score: 0.3 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:444 listed in] [list.dnswl.org] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Naga Sureshkumar Relli , Srinivas Neeli , netdev@vger.kernel.org, linux-can@vger.kernel.org, Marc Kleine-Budde , linux-arm-kernel@lists.infradead.org, Appana Durga Kedareswara rao , Jakub Kicinski , "David S. Miller" , Wolfgang Grandegger Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Srinivas Neeli Check return value of set_reset_mode() for error. Addresses-Coverity: "check_return" Signed-off-by: Srinivas Neeli Signed-off-by: Michal Simek --- 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; }