Commit 8cd3029
x86/microcode: Simplify Zhaoxin microcode patch saving
This patch simplifies the save_microcode_patch() function in the Zhaoxin
microcode driver by removing unnecessary variables and streamlining the
memory allocation and copying logic.
The changes include:
- Remove the unused local variable 'mc'.
- Directly handle memory allocation failure without redundant checks.
- Simplify the memcpy and assignment to zhaoxin_ucode_patch.
This improves code readability and reduces complexity without changing
functionality.
Signed-off-by: LeoLiu-oc <leoliu-oc@zhaoxin.com>1 parent f8c9c3c commit 8cd3029
1 file changed
Lines changed: 6 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
180 | 179 | | |
181 | 180 | | |
182 | 181 | | |
| |||
186 | 185 | | |
187 | 186 | | |
188 | 187 | | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
198 | 191 | | |
199 | 192 | | |
200 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
201 | 196 | | |
202 | 197 | | |
203 | 198 | | |
| |||
0 commit comments