dev_crypto_md5_copy: return error if allocating to_md->data fails