summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-06-30 10:52:18 +0300
committerDarren Hart (VMware) <dvhart@infradead.org>2017-07-05 11:24:41 -0700
commit7a3a51ab9467fb634dcfcd18eade61f418f540dd (patch)
treedebd578aefa493d8b5068500765e25655b0a317b /drivers/platform
parent74a1eb565c3f4ca55af2db8dc42c31ae311a79c0 (diff)
downloadop-kernel-dev-7a3a51ab9467fb634dcfcd18eade61f418f540dd.zip
op-kernel-dev-7a3a51ab9467fb634dcfcd18eade61f418f540dd.tar.gz
platform/x86: intel_telemetry_debugfs: fix some error codes in init
There are bunch of "goto out;" paths where we don't set the error code. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/intel_telemetry_debugfs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/platform/x86/intel_telemetry_debugfs.c b/drivers/platform/x86/intel_telemetry_debugfs.c
index 4cc2f4e..b8be058 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,
OpenPOWER on IntegriCloud