Commit 072755c
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: 7852028 ("mmc: block: register RPMB partition with the RPMB subsystem")
Reviewed-by: Avri Altman <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
Signed-off-by: Bean Huo <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>1 parent f338529 commit 072755c
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2930 | 2930 | | |
2931 | 2931 | | |
2932 | 2932 | | |
2933 | | - | |
| 2933 | + | |
2934 | 2934 | | |
2935 | 2935 | | |
2936 | 2936 | | |
2937 | 2937 | | |
2938 | 2938 | | |
2939 | 2939 | | |
2940 | | - | |
2941 | | - | |
| 2940 | + | |
| 2941 | + | |
2942 | 2942 | | |
2943 | 2943 | | |
2944 | 2944 | | |
| |||
0 commit comments