gig_dbg(DEBUG_INIT, "clearing at_state");
clear_at_state(&cs->at_state);
dealloc_temp_at_states(cs);
+ tty_port_destroy(&cs->port);
/* fall through */
case 0: /* error in basic setup */
kfree(cs->bcs);
f_cs: gig_dbg(DEBUG_INIT, "freeing cs");
mutex_unlock(&cs->mutex);
- tty_port_destroy(&cs->port);
free_cs(cs);
}
EXPORT_SYMBOL_GPL(gigaset_freecs);
gig_dbg(DEBUG_INIT, "setting up iif");
if (gigaset_isdn_regdev(cs, modulename) < 0) {
pr_err("error registering ISDN device\n");
- goto error_port;
+ goto error;
}
make_valid(cs, VALID_ID);
++cs->cs_init;
gig_dbg(DEBUG_INIT, "setting up hw");
if (cs->ops->initcshw(cs) < 0)
- goto error_port;
+ goto error;
++cs->cs_init;
gig_dbg(DEBUG_INIT, "setting up bcs[%d]", i);
if (gigaset_initbcs(cs->bcs + i, cs, i) < 0) {
pr_err("could not allocate channel %d data\n", i);
- goto error_port;
+ goto error;
}
}
gig_dbg(DEBUG_INIT, "cs initialized");
return cs;
-error_port:
- tty_port_destroy(&cs->port);
+
error:
gig_dbg(DEBUG_INIT, "failed");
gigaset_freecs(cs);