[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-4b25f42a371b16807f0966490f8faad9abc712d9@git.kernel.org>
Date: Tue, 20 Jan 2015 03:55:45 -0800
From: tip-bot for Andy Shevchenko <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, rafael.j.wysocki@...el.com,
tglx@...utronix.de, aubrey.li@...ux.intel.com, mingo@...nel.org,
mahesh.kumar.p@...el.com, andriy.shevchenko@...ux.intel.com,
hpa@...or.com
Subject: [tip:x86/platform] x86: pmc_atom: Clean up init function
Commit-ID: 4b25f42a371b16807f0966490f8faad9abc712d9
Gitweb: http://git.kernel.org/tip/4b25f42a371b16807f0966490f8faad9abc712d9
Author: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
AuthorDate: Wed, 14 Jan 2015 18:39:34 +0200
Committer: Thomas Gleixner <tglx@...utronix.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@...ux.intel.com>
Acked-by: Aubrey Li <aubrey.li@...ux.intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Cc: Kumar P. Mahesh <mahesh.kumar.p@...el.com>
Link: http://lkml.kernel.org/r/1421253575-22509-5-git-send-email-andriy.shevchenko@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@...utronix.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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists