mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Dan Carpenter" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Dan Carpenter <dan.carpenter@linaro.org>,
	Ingo Molnar <mingo@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: perf/core] perf/x86/amd/uncore: Fix uninitialized return value in amd_uncore_init()
Date: Fri, 13 Oct 2023 07:42:53 -0000	[thread overview]
Message-ID: <169718297336.3135.15401455533118971114.tip-bot2@tip-bot2> (raw)
In-Reply-To: <cec62eba-c4b8-4cb7-9671-58894dd4b974@moroto.mountain>

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     7543365739a4ff61d40ad53ab68c17d2e7dfb0c9
Gitweb:        https://git.kernel.org/tip/7543365739a4ff61d40ad53ab68c17d2e7dfb0c9
Author:        Dan Carpenter <dan.carpenter@linaro.org>
AuthorDate:    Fri, 13 Oct 2023 10:18:12 +03:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Fri, 13 Oct 2023 09:32:50 +02:00

perf/x86/amd/uncore: Fix uninitialized return value in amd_uncore_init()

Some of the error paths in this function return don't initialize the
error code.  Return -ENODEV by default.

Fixes: d6389d3ccc13 ("perf/x86/amd/uncore: Refactor uncore management")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/cec62eba-c4b8-4cb7-9671-58894dd4b974@moroto.mountain
---
 arch/x86/events/amd/uncore.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/events/amd/uncore.c b/arch/x86/events/amd/uncore.c
index 9b444ce..a389828 100644
--- a/arch/x86/events/amd/uncore.c
+++ b/arch/x86/events/amd/uncore.c
@@ -1009,7 +1009,8 @@ static struct amd_uncore uncores[UNCORE_TYPE_MAX] = {
 static int __init amd_uncore_init(void)
 {
 	struct amd_uncore *uncore;
-	int ret, i;
+	int ret = -ENODEV;
+	int i;
 
 	if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD &&
 	    boot_cpu_data.x86_vendor != X86_VENDOR_HYGON)

  parent reply	other threads:[~2023-10-13  7:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-13  7:18 [PATCH] perf/x86/amd/uncore: fix error codes " Dan Carpenter
2023-10-13  7:30 ` Ingo Molnar
2023-10-13  8:12   ` Dan Carpenter
2023-10-13  9:06     ` Ingo Molnar
2023-10-13  9:09       ` Uros Bizjak
2023-10-14  9:03         ` Ingo Molnar
2023-10-16 10:39           ` Dan Carpenter
2023-10-16 11:18             ` Ingo Molnar
2023-10-13  7:42 ` tip-bot2 for Dan Carpenter [this message]
2023-10-13  7:44 ` Sandipan Das
2023-10-13  9:03   ` Ingo Molnar
2023-10-13  9:07     ` Sandipan Das

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=169718297336.3135.15401455533118971114.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=dan.carpenter@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=x86@kernel.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

all inboxes | Powered by JetHome®