return 0;
- /* Jump directly inside the loop to close the buffers that were already
- * opened. */
- for(; i>=0; i--) {
- close_buf(chan->buf[i]);
+ /* Error handling */
error:
- do {} while(0);
- }
+ for(i--; i >= 0; i--)
+ close_buf(chan->buf[i]);
pthread_mutex_unlock(&ust_buffers_channels_mutex);
return -1;
PERROR("shmdt");
}
}
+ return 0;
}
/*
case LTT_RFLAG_ID:
header.id_time = 31 << LTT_TSC_BITS;
break;
+ default:
+ WARN_ON_ONCE(1);
+ header.id_time = 0;
+ break;
}
header.id_time |= (u32)tsc & LTT_TSC_MASK;