From: Andy Shevchenko <andy.shevchenko@gmail.com> To: Dan Carpenter <dan.carpenter@oracle.com> Cc: Souvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>, Darren Hart <dvhart@infradead.org>, Andy Shevchenko <andy@infradead.org>, Platform Driver <platform-driver-x86@vger.kernel.org>, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] platform/x86: intel_telemetry_debugfs: fix some error codes in init Date: Fri, 30 Jun 2017 16:17:57 +0000 [thread overview] Message-ID: <CAHp75Vd9EVkThvxE8RDdr3D3M8dbPvYXRgtLri9c-z4qxFXLtQ@mail.gmail.com> (raw) In-Reply-To: <20170630075218.m4eal2iqu5i2skx5@mwanda> On Fri, Jun 30, 2017 at 10:52 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote: > There are bunch of "goto out;" paths where we don't set the error code. > Applied for testing, thanks! > 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, -- With Best Regards, Andy Shevchenko
WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andy.shevchenko@gmail.com> To: Dan Carpenter <dan.carpenter@oracle.com> Cc: Souvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>, Darren Hart <dvhart@infradead.org>, Andy Shevchenko <andy@infradead.org>, Platform Driver <platform-driver-x86@vger.kernel.org>, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] platform/x86: intel_telemetry_debugfs: fix some error codes in init Date: Fri, 30 Jun 2017 19:17:57 +0300 [thread overview] Message-ID: <CAHp75Vd9EVkThvxE8RDdr3D3M8dbPvYXRgtLri9c-z4qxFXLtQ@mail.gmail.com> (raw) In-Reply-To: <20170630075218.m4eal2iqu5i2skx5@mwanda> On Fri, Jun 30, 2017 at 10:52 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote: > There are bunch of "goto out;" paths where we don't set the error code. > Applied for testing, thanks! > 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, -- With Best Regards, Andy Shevchenko
next prev parent reply other threads:[~2017-06-30 16:17 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-06-30 7:52 [PATCH] platform/x86: intel_telemetry_debugfs: fix some error codes in init Dan Carpenter 2017-06-30 7:52 ` Dan Carpenter 2017-06-30 16:17 ` Andy Shevchenko [this message] 2017-06-30 16:17 ` 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=CAHp75Vd9EVkThvxE8RDdr3D3M8dbPvYXRgtLri9c-z4qxFXLtQ@mail.gmail.com \ --to=andy.shevchenko@gmail.com \ --cc=andy@infradead.org \ --cc=dan.carpenter@oracle.com \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.