From: tip-bot for Andy Shevchenko <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, rafael.j.wysocki@intel.com,
tglx@linutronix.de, aubrey.li@linux.intel.com, mingo@kernel.org,
mahesh.kumar.p@intel.com, andriy.shevchenko@linux.intel.com,
hpa@zytor.com
Subject: [tip:x86/platform] x86: pmc_atom: Clean up init function
Date: Tue, 20 Jan 2015 03:55:45 -0800 [thread overview]
Message-ID: <tip-4b25f42a371b16807f0966490f8faad9abc712d9@git.kernel.org> (raw)
In-Reply-To: <1421253575-22509-5-git-send-email-andriy.shevchenko@linux.intel.com>
Commit-ID: 4b25f42a371b16807f0966490f8faad9abc712d9
Gitweb: http://git.kernel.org/tip/4b25f42a371b16807f0966490f8faad9abc712d9
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
AuthorDate: Wed, 14 Jan 2015 18:39:34 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 20 Jan 2015 12:50:14 +0100
x86: pmc_atom: Clean up init function
There is no need to use err variable.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Aubrey Li <aubrey.li@linux.intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Kumar P. Mahesh <mahesh.kumar.p@intel.com>
Link: http://lkml.kernel.org/r/1421253575-22509-5-git-send-email-andriy.shevchenko@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/kernel/pmc_atom.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/arch/x86/kernel/pmc_atom.c b/arch/x86/kernel/pmc_atom.c
index 6b62f55..f8becc4 100644
--- a/arch/x86/kernel/pmc_atom.c
+++ b/arch/x86/kernel/pmc_atom.c
@@ -288,7 +288,6 @@ MODULE_DEVICE_TABLE(pci, pmc_pci_ids);
static int __init pmc_atom_init(void)
{
- int err = -ENODEV;
struct pci_dev *pdev = NULL;
const struct pci_device_id *ent;
@@ -302,14 +301,11 @@ static int __init pmc_atom_init(void)
*/
for_each_pci_dev(pdev) {
ent = pci_match_id(pmc_pci_ids, pdev);
- if (ent) {
- err = pmc_setup_dev(pdev);
- goto out;
- }
+ if (ent)
+ return pmc_setup_dev(pdev);
}
/* Device not found. */
-out:
- return err;
+ return -ENODEV;
}
module_init(pmc_atom_init);
next prev parent reply other threads:[~2015-01-20 11:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-14 16:39 [PATCH v5 0/5] x86: clean ups and feature enhancement in pmc_atom Andy Shevchenko
2015-01-14 16:39 ` [PATCH v5 1/5] x86: pmc-atom: assign debugfs node as soon as possible Andy Shevchenko
2015-01-20 11:54 ` [tip:x86/platform] x86: pmc-atom: Assign " tip-bot for Andy Shevchenko
2015-01-14 16:39 ` [PATCH v5 2/5] x86: pmc_atom: don't check for NULL twice Andy Shevchenko
2015-01-20 11:55 ` [tip:x86/platform] x86: pmc_atom: don%27t " tip-bot for Andy Shevchenko
2015-01-14 16:39 ` [PATCH v5 3/5] x86: pmc-atom: remove unused macro Andy Shevchenko
2015-01-20 11:55 ` [tip:x86/platform] x86: pmc-atom: Remove " tip-bot for Andy Shevchenko
2015-01-14 16:39 ` [PATCH v5 4/5] x86: pmc_atom: clean up init function Andy Shevchenko
2015-01-20 11:55 ` tip-bot for Andy Shevchenko [this message]
2015-01-14 16:39 ` [PATCH v5 5/5] x86: pmc_atom: expose contents of PSS Andy Shevchenko
2015-01-20 11:56 ` [tip:x86/platform] x86: pmc_atom: Expose " tip-bot for 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=tip-4b25f42a371b16807f0966490f8faad9abc712d9@git.kernel.org \
--to=tipbot@zytor.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=aubrey.li@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mahesh.kumar.p@intel.com \
--cc=mingo@kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=tglx@linutronix.de \
/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
Powered by JetHome