Commit 0cb7ae9
regcache: Allocate and free reg_defaults on the same level
Currently reg_defaults buffer may be allocated on two different
levels when the user provided them and we duplicate it in regcache_init()
or when user wants us to read back from HW in regcache_hw_init().
This inconsistency makes code harder to follow and maintain. Allocate
and free reg_defaults on the same level in regcache_init() to improve
the readability and maintenance efforts.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260305085449.3184020-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent 8e2d279 commit 0cb7ae9
1 file changed
Lines changed: 15 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | 65 | | |
71 | 66 | | |
72 | 67 | | |
73 | 68 | | |
74 | 69 | | |
75 | 70 | | |
76 | 71 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 72 | + | |
| 73 | + | |
81 | 74 | | |
82 | 75 | | |
83 | 76 | | |
| |||
110 | 103 | | |
111 | 104 | | |
112 | 105 | | |
113 | | - | |
| 106 | + | |
114 | 107 | | |
115 | 108 | | |
116 | 109 | | |
| |||
120 | 113 | | |
121 | 114 | | |
122 | 115 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | 116 | | |
129 | 117 | | |
130 | 118 | | |
131 | 119 | | |
132 | | - | |
133 | 120 | | |
134 | 121 | | |
135 | 122 | | |
| |||
209 | 196 | | |
210 | 197 | | |
211 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
212 | 204 | | |
213 | 205 | | |
214 | 206 | | |
215 | 207 | | |
216 | | - | |
| 208 | + | |
217 | 209 | | |
218 | | - | |
| 210 | + | |
219 | 211 | | |
220 | 212 | | |
221 | 213 | | |
| |||
253 | 245 | | |
254 | 246 | | |
255 | 247 | | |
| 248 | + | |
| 249 | + | |
256 | 250 | | |
257 | 251 | | |
258 | 252 | | |
| |||
273 | 267 | | |
274 | 268 | | |
275 | 269 | | |
| 270 | + | |
| 271 | + | |
276 | 272 | | |
277 | 273 | | |
278 | 274 | | |
| |||
0 commit comments