Commit 777a5eda authored by Federico Vaga's avatar Federico Vaga

kernel: fix: no need to clear unused memory

bugfix typo "- -" from the previous patch and the memset() cause a
kernel oops because the memset (sometimes) overwrite some valid memory
address.

The patch fix the typo and remove the memset because it is not usefult
Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 33cfe823
......@@ -144,9 +144,8 @@ void zfad_dma_done(struct zio_cset *cset)
* resize the datalen, by removing the trigger tstamp and the
* extra samples (trigger samples, 1 for each channel)
*/
block->datalen = block->datalen - FA_TRIG_TIMETAG_BYTES -
block->datalen = block->datalen - FA_TRIG_TIMETAG_BYTES
- (ctrl->ssize * FA_NCHAN);
memset(block->data+block->datalen, 0, FA_TRIG_TIMETAG_BYTES);
/* update seq num */
ctrl->seq_num = i;
......
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