commit 6305ce69 git:core branch:projects/t3 ddr:b6f7a21
Author: xia.jin <xia.jin@amlogic.com>
Date: Mon Dec 30 06:52:04 2024 +0000
Riscure: fix default return value issue [1/1]
PD#RSP-6590
Problem:
Riscure review finding:
In this (and many other functions) the return values are initialized to the
'success' value at the start of the function. If for whatever reason (e.g.
fault injection) the call to mkl_keygen() gets skipped, then the value of
'ret' still fulfills the check and the error is not properly detected,
potentially leading to incorrect initialization.
Solution:
Set default return value of 0 to -1 in drivers;
Verify:
T3
Change-Id: Ibbda8640a8a1d4136d15ba763ef5930898d8b3b2
Signed-off-by: xia.jin <xia.jin@amlogic.com>
t3 build ok
Change-Id: Ic5dbb5b29f0a439550941e4922c935e0b9fd9db0
4 files changed