static void chsc_remove_cmg_attr(struct channel_subsystem *css) { int i; for (i = 0; i <= __MAX_CHPID; i++) { if (!css->chps[i]) continue; chp_remove_cmg_attr(css->chps[i]); } }
static int chsc_add_cmg_attr(struct channel_subsystem *css) { int i, ret; ret = 0; for (i = 0; i <= __MAX_CHPID; i++) { if (!css->chps[i]) continue; ret = chp_add_cmg_attr(css->chps[i]); if (ret) goto cleanup; } return ret; cleanup: for (--i; i >= 0; i--) { if (!css->chps[i]) continue; chp_remove_cmg_attr(css->chps[i]); } return ret; }