Skip to content

uadk: modify the return value of rsa_prepare_key() in hpre#762

Merged
Liulongfang merged 1 commit into
Linaro:masterfrom
tomismyfriend:master
May 8, 2026
Merged

uadk: modify the return value of rsa_prepare_key() in hpre#762
Liulongfang merged 1 commit into
Linaro:masterfrom
tomismyfriend:master

Conversation

@tomismyfriend
Copy link
Copy Markdown

The 'ret' value is assigned in the case of 'req->op_type == WD_RSA_GENKEY'. When 'op_type' is not 'WD_RSA_GENKEY', 'ret' is not initialized. If 'ret' is directly returned, the caller may incorrectly determine that the operation fails. Therefore, 'WD_SUCCESS' instead of 'ret' is directly returned.

The 'ret' value is assigned in the case of 'req->op_type == WD_RSA_GENKEY'.
When 'op_type' is not 'WD_RSA_GENKEY', 'ret' is not initialized. If
'ret' is directly returned, the caller may incorrectly determine that
the operation fails. Therefore, 'WD_SUCCESS' instead of 'ret' is
directly returned.

Signed-off-by: Weili Qian <qianweili@huawei.com>
@qwl731
Copy link
Copy Markdown

qwl731 commented May 8, 2026

/lgtm

Copy link
Copy Markdown
Collaborator

@Liulongfang Liulongfang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@Liulongfang Liulongfang merged commit 97d643e into Linaro:master May 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants