diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2015-01-14 11:39:34 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-01-20 06:50:14 -0500 |
commit | 4b25f42a371b16807f0966490f8faad9abc712d9 (patch) | |
tree | 061ee5645c49db89d73b1202c0e38bbf0a78f375 | |
parent | 4922b9ce89ccdeb99364666f1fcc297c4af31bf7 (diff) |
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>
-rw-r--r-- | arch/x86/kernel/pmc_atom.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/x86/kernel/pmc_atom.c b/arch/x86/kernel/pmc_atom.c index 6b62f55f40c4..f8becc43295c 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); | |||
288 | 288 | ||
289 | static int __init pmc_atom_init(void) | 289 | static int __init pmc_atom_init(void) |
290 | { | 290 | { |
291 | int err = -ENODEV; | ||
292 | struct pci_dev *pdev = NULL; | 291 | struct pci_dev *pdev = NULL; |
293 | const struct pci_device_id *ent; | 292 | const struct pci_device_id *ent; |
294 | 293 | ||
@@ -302,14 +301,11 @@ static int __init pmc_atom_init(void) | |||
302 | */ | 301 | */ |
303 | for_each_pci_dev(pdev) { | 302 | for_each_pci_dev(pdev) { |
304 | ent = pci_match_id(pmc_pci_ids, pdev); | 303 | ent = pci_match_id(pmc_pci_ids, pdev); |
305 | if (ent) { | 304 | if (ent) |
306 | err = pmc_setup_dev(pdev); | 305 | return pmc_setup_dev(pdev); |
307 | goto out; | ||
308 | } | ||
309 | } | 306 | } |
310 | /* Device not found. */ | 307 | /* Device not found. */ |
311 | out: | 308 | return -ENODEV; |
312 | return err; | ||
313 | } | 309 | } |
314 | 310 | ||
315 | module_init(pmc_atom_init); | 311 | module_init(pmc_atom_init); |