Skip to content

Commit

Permalink
x86: pmc_atom: Clean up init function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Shevchenko authored and Thomas Gleixner committed Jan 20, 2015
1 parent 4922b9c commit 4b25f42
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions arch/x86/kernel/pmc_atom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);
Expand Down

0 comments on commit 4b25f42

Please sign in to comment.