From: Dan Carpenter <dan.carpenter@oracle.com>
To: Souvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>
Cc: Darren Hart <dvhart@infradead.org>,
Andy Shevchenko <andy@infradead.org>,
platform-driver-x86@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH] platform/x86: intel_telemetry_debugfs: fix some error codes in init
Date: Fri, 30 Jun 2017 07:52:18 +0000 [thread overview]
Message-ID: <20170630075218.m4eal2iqu5i2skx5@mwanda> (raw)
There are bunch of "goto out;" paths where we don't set the error code.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/platform/x86/intel_telemetry_debugfs.c b/drivers/platform/x86/intel_telemetry_debugfs.c
index 4cc2f4ea0a25..b8be058a8754 100644
--- a/drivers/platform/x86/intel_telemetry_debugfs.c
+++ b/drivers/platform/x86/intel_telemetry_debugfs.c
@@ -938,7 +938,7 @@ static struct notifier_block pm_notifier = {
static int __init telemetry_debugfs_init(void)
{
const struct x86_cpu_id *id;
- int err = -ENOMEM;
+ int err;
struct dentry *f;
/* Only APL supported for now */
@@ -958,11 +958,10 @@ static int __init telemetry_debugfs_init(void)
register_pm_notifier(&pm_notifier);
+ err = -ENOMEM;
debugfs_conf->telemetry_dbg_dir = debugfs_create_dir("telemetry", NULL);
- if (!debugfs_conf->telemetry_dbg_dir) {
- err = -ENOMEM;
+ if (!debugfs_conf->telemetry_dbg_dir)
goto out_pm;
- }
f = debugfs_create_file("pss_info", S_IFREG | S_IRUGO,
debugfs_conf->telemetry_dbg_dir, NULL,
next reply other threads:[~2017-06-30 7:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-30 7:52 Dan Carpenter [this message]
2017-06-30 16:17 ` [PATCH] platform/x86: intel_telemetry_debugfs: fix some error codes in init Andy Shevchenko
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=20170630075218.m4eal2iqu5i2skx5@mwanda \
--to=dan.carpenter@oracle.com \
--cc=andy@infradead.org \
--cc=dvhart@infradead.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=souvik.k.chakravarty@intel.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