aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/i2o/iop.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/i2o/iop.c')
-rw-r--r--drivers/staging/i2o/iop.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/drivers/staging/i2o/iop.c b/drivers/staging/i2o/iop.c
index 52334fc8b547..23bdbe4aa480 100644
--- a/drivers/staging/i2o/iop.c
+++ b/drivers/staging/i2o/iop.c
@@ -1042,7 +1042,7 @@ static void i2o_iop_release(struct device *dev)
*/
struct i2o_controller *i2o_iop_alloc(void)
{
- static int unit = 0; /* 0 and 1 are NULL IOP and Local Host */
+ static int unit; /* 0 and 1 are NULL IOP and Local Host */
struct i2o_controller *c;
char poolname[32];
@@ -1096,7 +1096,8 @@ int i2o_iop_add(struct i2o_controller *c)
{
int rc;
- if ((rc = device_add(&c->device))) {
+ rc = device_add(&c->device);
+ if (rc) {
osm_err("%s: could not add controller\n", c->name);
goto iop_reset;
}
@@ -1105,24 +1106,28 @@ int i2o_iop_add(struct i2o_controller *c)
osm_info("%s: This may take a few minutes if there are many devices\n",
c->name);
- if ((rc = i2o_iop_activate(c))) {
+ rc = i2o_iop_activate(c);
+ if (rc) {
osm_err("%s: could not activate controller\n", c->name);
goto device_del;
}
osm_debug("%s: building sys table...\n", c->name);
- if ((rc = i2o_systab_build()))
+ rc = i2o_systab_build();
+ if (rc)
goto device_del;
osm_debug("%s: online controller...\n", c->name);
- if ((rc = i2o_iop_online(c)))
+ rc = i2o_iop_online(c);
+ if (rc)
goto device_del;
osm_debug("%s: getting LCT...\n", c->name);
- if ((rc = i2o_exec_lct_get(c)))
+ rc = i2o_exec_lct_get(c);
+ if (rc)
goto device_del;
list_add(&c->list, &i2o_controllers);
@@ -1192,13 +1197,16 @@ static int __init i2o_iop_init(void)
printk(KERN_INFO OSM_DESCRIPTION " v" OSM_VERSION "\n");
- if ((rc = i2o_driver_init()))
+ rc = i2o_driver_init();
+ if (rc)
goto exit;
- if ((rc = i2o_exec_init()))
+ rc = i2o_exec_init();
+ if (rc)
goto driver_exit;
- if ((rc = i2o_pci_init()))
+ rc = i2o_pci_init();
+ if (rc)
goto exec_exit;
return 0;