Commit 072755cc authored by Bean Huo's avatar Bean Huo Committed by Ulf Hansson
Browse files

mmc: core: Fix variable shadowing in mmc_route_rpmb_frames()



Rename the inner 'frm' variable to 'resp_frm' in the write path of
mmc_route_rpmb_frames() to avoid shadowing the outer 'frm' variable.

The function declares 'frm' at function scope pointing to the request
frame, but then redeclares another 'frm' variable inside the write
block pointing to the response frame. This shadowing makes the code
confusing and error-prone.

Using 'resp_frm' for the response frame makes the distinction clear
and improves code readability.

Fixes: 7852028a ("mmc: block: register RPMB partition with the RPMB subsystem")
Reviewed-by: default avatarAvri Altman <avri.altman@sandisk.com>
Reviewed-by: default avatarJens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: default avatarBean Huo <beanhuo@micron.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent f338529c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment