Commit d2a6eaee authored by Jeremy Sowden's avatar Jeremy Sowden Committed by Greg Kroah-Hartman

staging: kpc2000: inverted conditional in order to reduce indentation.

Changed:

  for (...) {
    ...
    if (expr) {
      ...
    }
  }

into:

  for (...) {
    ...
    if (!expr)
      continue;
    ...
  }

in order to reduce indentation of conditional block.  Fixed indentation
of cases blocks at the same time.
Signed-off-by: default avatarJeremy Sowden <jeremy@azazel.net>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d34141eb
...@@ -414,26 +414,31 @@ int kp2000_probe_cores(struct kp2000_device *pcard) ...@@ -414,26 +414,31 @@ int kp2000_probe_cores(struct kp2000_device *pcard)
read_val = readq(pcard->sysinfo_regs_base + ((pcard->core_table_offset + i) * 8)); read_val = readq(pcard->sysinfo_regs_base + ((pcard->core_table_offset + i) * 8));
parse_core_table_entry(&cte, read_val, pcard->core_table_rev); parse_core_table_entry(&cte, read_val, pcard->core_table_rev);
if (cte.type == current_type_id){ if (cte.type != current_type_id)
switch (cte.type){ continue;
case KP_CORE_ID_I2C:
err = probe_core_basic(core_num, pcard, KP_DRIVER_NAME_I2C, cte); switch (cte.type) {
break; case KP_CORE_ID_I2C:
err = probe_core_basic(core_num, pcard,
case KP_CORE_ID_SPI: KP_DRIVER_NAME_I2C, cte);
err = probe_core_basic(core_num, pcard, KP_DRIVER_NAME_SPI, cte); break;
break;
case KP_CORE_ID_SPI:
default: err = probe_core_basic(core_num, pcard,
err = probe_core_uio(core_num, pcard, "kpc_uio", cte); KP_DRIVER_NAME_SPI, cte);
break; break;
}
if (err){ default:
dev_err(&pcard->pdev->dev, "kp2000_probe_cores: failed to add core %d: %d\n", i, err); err = probe_core_uio(core_num, pcard, "kpc_uio", cte);
return err; break;
}
core_num++;
} }
if (err) {
dev_err(&pcard->pdev->dev,
"kp2000_probe_cores: failed to add core %d: %d\n",
i, err);
return err;
}
core_num++;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment