public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Markus Elfring <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: wangnan0@huawei.com, hekuang@huawei.com, adrian.hunter@intel.com,
	peterz@infradead.org, alexander.shishkin@linux.intel.com,
	linux-kernel@vger.kernel.org, acme@redhat.com, hpa@zytor.com,
	mingo@kernel.org, elfring@users.sourceforge.net,
	tglx@linutronix.de, jolsa@kernel.org, mhiramat@kernel.org,
	ravi.bangoria@linux.vnet.ibm.com, milian.wolff@kdab.com
Subject: [tip:perf/core] perf probe: Delete an unnecessary assignment in try_to_find_absolute_address()
Date: Thu, 26 Jan 2017 07:29:11 -0800	[thread overview]
Message-ID: <tip-d1d0e29cb7d03a6019caa125e4c0288366a4f359@git.kernel.org> (raw)
In-Reply-To: <0ede09ec-79b6-c8bd-5b20-02c63ed98aab@users.sourceforge.net>

Commit-ID:  d1d0e29cb7d03a6019caa125e4c0288366a4f359
Gitweb:     http://git.kernel.org/tip/d1d0e29cb7d03a6019caa125e4c0288366a4f359
Author:     Markus Elfring <elfring@users.sourceforge.net>
AuthorDate: Mon, 23 Jan 2017 15:10:19 +0100
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 26 Jan 2017 11:42:56 -0300

perf probe: Delete an unnecessary assignment in try_to_find_absolute_address()

Remove an error code assignment which is redundant in an if branch for
the handling of a memory allocation failure because the same value was
set for the local variable "err" before.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: kernel-janitors@vger.kernel.org
Link: http://lkml.kernel.org/r/0ede09ec-79b6-c8bd-5b20-02c63ed98aab@users.sourceforge.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/probe-event.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index cdfc468..ded1e7d 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -2994,10 +2994,9 @@ static int try_to_find_absolute_address(struct perf_probe_event *pev,
 
 	tev->nargs = pev->nargs;
 	tev->args = zalloc(sizeof(struct probe_trace_arg) * tev->nargs);
-	if (!tev->args) {
-		err = -ENOMEM;
+	if (!tev->args)
 		goto errout;
-	}
+
 	for (i = 0; i < tev->nargs; i++)
 		copy_to_probe_trace_arg(&tev->args[i], &pev->args[i]);
 

  parent reply	other threads:[~2017-01-26 15:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23 15:20 [PATCH 0/4] perf: Fine-tuning for three function implementations SF Markus Elfring
2017-01-23 15:22 ` [PATCH 1/4] perf probe: Delete an unnecessary check in try_to_find_absolute_address() SF Markus Elfring
2017-01-23 22:48   ` Masami Hiramatsu
2017-01-26 15:28   ` [tip:perf/core] " tip-bot for Markus Elfring
2017-01-23 15:24 ` [PATCH 2/4] perf probe: Delete an unnecessary assignment " SF Markus Elfring
2017-01-23 22:47   ` Masami Hiramatsu
2017-01-26 15:29   ` tip-bot for Markus Elfring [this message]
2017-01-23 15:25 ` [PATCH 3/4] perf session: Move an error code assignment in __perf_session__set_tracepoints_handlers() SF Markus Elfring
2017-01-23 22:56   ` Masami Hiramatsu
2017-01-23 15:26 ` [PATCH 4/4] perf strlist: Move an error code assignment in strlist__parse_list_entry() SF Markus Elfring
2017-01-23 23:32   ` Masami Hiramatsu

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=tip-d1d0e29cb7d03a6019caa125e4c0288366a4f359@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=elfring@users.sourceforge.net \
    --cc=hekuang@huawei.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=milian.wolff@kdab.com \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=ravi.bangoria@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=wangnan0@huawei.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