drivers: crypto: intel_sha: make set_resume_length_dw1 void
intel_sha_set_resume_length_dw1() never reports errors and always returns 0. The error check at the call site is therefore dead code. Make the function void and drop the unused error handling. Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
This commit is contained in:
committed by
Maureen Helm
parent
f017f4cb91
commit
bca0b43be9
@@ -52,10 +52,9 @@ static int intel_sha_set_resume_length_dw0(struct sha_container *sha, uint32_t l
|
||||
return err;
|
||||
}
|
||||
|
||||
static int intel_sha_set_resume_length_dw1(struct sha_container *sha, uint32_t upper_length)
|
||||
static void intel_sha_set_resume_length_dw1(struct sha_container *sha, uint32_t upper_length)
|
||||
{
|
||||
sha->dfsha->sharldw1.full = upper_length;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int intel_sha_regs_cpy(void *dst, const void *src, size_t len)
|
||||
@@ -116,10 +115,8 @@ static int intel_sha_device_run(const struct device *dev, const void *buf_in, si
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
err = intel_sha_set_resume_length_dw1(self, self->dfsha->shaaldw1.full);
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
intel_sha_set_resume_length_dw1(self, self->dfsha->shaaldw1.full);
|
||||
|
||||
err = intel_sha_regs_cpy((void *)self->dfsha->initial_vector,
|
||||
(void *)self->dfsha->sha_result,
|
||||
sizeof(self->dfsha->initial_vector));
|
||||
|
||||
Reference in New Issue
Block a user