summaryrefslogtreecommitdiff
path: root/include/bootdev.h
diff options
context:
space:
mode:
authorPeng Fan <[email protected]>2026-07-13 21:32:53 +0800
committerPeng Fan <[email protected]>2026-07-29 11:15:55 +0800
commit67d06fe102712dc07e05bbdf893fc48ba73c86a6 (patch)
treed97bd924efdf4266fd080342f3df5b8745bdce6c /include/bootdev.h
parentf23b5e079a93245c01f618022fd76d189070d190 (diff)
mmc: rpmb: fix tautological condition in RPMB_REQ_READ_DATA validation
In rpmb_route_frames(), the RPMB_REQ_READ_DATA case checks "req_cnt != 1 || !req_cnt" which is tautological -- !req_cnt (req_cnt == 0) is always a subset of req_cnt != 1. The second operand is dead code. Based on the pattern of all other cases in the switch (RPMB_REQ_KEY, RPMB_REQ_WRITE_DATA, RPMB_REQ_WCOUNTER) which validate rsp_cnt, this was meant to be "req_cnt != 1 || !rsp_cnt". Without this fix, a caller could pass rsp_cnt=0 for a read request without validation. Signed-off-by: Peng Fan <[email protected]>
Diffstat (limited to 'include/bootdev.h')
0 files changed, 0 insertions, 0 deletions