return -ENOMEM;
}
- if (state->bufcnt)
- memcpy(buf, rctx->hdev->xmit_buf, state->bufcnt);
+ memcpy(buf, rctx->hdev->xmit_buf, state->bufcnt);
scatterwalk_map_and_copy(buf + state->bufcnt, sg, rctx->offset,
min(new_len, rctx->total) - state->bufcnt, 0);
}
/* copy buffer in a temporary one that is used for sg alignment */
- if (state->bufcnt)
- memcpy(hdev->xmit_buf, state->buffer, state->bufcnt);
+ memcpy(hdev->xmit_buf, state->buffer, state->bufcnt);
ret = stm32_hash_align_sgs(req->src, nbytes, bs, init, final, rctx);
if (ret)