linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gianfranco Trad <gianf.trad@gmail.com>
To: rostedt@goodmis.org, mhiramat@kernel.org, mark.rutland@arm.com,
	mathieu.desnoyers@efficios.com
Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	skhan@linuxfoundation.org, Gianfranco Trad <gianf.trad@gmail.com>
Subject: [PATCH] fgraph: fix unused value in register_ftrace_graph()
Date: Mon, 21 Oct 2024 12:24:29 +0200	[thread overview]
Message-ID: <20241021102428.287998-2-gianf.trad@gmail.com> (raw)

Coverity reports unused assignment to value ret. [1]
ret is assigned to 0 here, but that stored value is overwritten before
it can be used. The overwrite might happen either at line 1277, 1290 
or eventually at line 1306. Therefore, cleanup the unused assignment.

[1] Coverity Scan, CID 1633338

Signed-off-by: Gianfranco Trad <gianf.trad@gmail.com>
---
 kernel/trace/fgraph.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c
index 41e7a15dcb50..cc2e065c1c8d 100644
--- a/kernel/trace/fgraph.c
+++ b/kernel/trace/fgraph.c
@@ -1262,7 +1262,6 @@ int register_ftrace_graph(struct fgraph_ops *gops)
 			return ret;
 		}
 		fgraph_initialized = true;
-		ret = 0;
 	}
 
 	if (!fgraph_array[0]) {
-- 
2.43.0


             reply	other threads:[~2024-10-21 10:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-21 10:24 Gianfranco Trad [this message]
2024-10-22  6:56 ` [PATCH] fgraph: fix unused value in register_ftrace_graph() Steven Rostedt

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=20241021102428.287998-2-gianf.trad@gmail.com \
    --to=gianf.trad@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=skhan@linuxfoundation.org \
    /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).