Commit 5e5c793
dmaengine: ti: omap-dma: Initialize sglen after allocation
With the new __counted_by annocation, the "sglen" struct member must
be set before accessing the "sg" array. This initialization was done in
other places where a new struct omap_desc is allocated, but these cases
were missed. Set "sglen" after allocation.
Fixes: b851786 ("dmaengine: ti: omap-dma: Annotate struct omap_desc with __counted_by")
Signed-off-by: Kees Cook <[email protected]>
Reviewed-by: Gustavo A. R. Silva <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>1 parent 2ebc36b commit 5e5c793
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1186 | 1186 | | |
1187 | 1187 | | |
1188 | 1188 | | |
| 1189 | + | |
1189 | 1190 | | |
1190 | 1191 | | |
1191 | 1192 | | |
1192 | | - | |
1193 | 1193 | | |
1194 | 1194 | | |
1195 | 1195 | | |
| |||
1258 | 1258 | | |
1259 | 1259 | | |
1260 | 1260 | | |
| 1261 | + | |
1261 | 1262 | | |
1262 | 1263 | | |
1263 | 1264 | | |
1264 | | - | |
1265 | 1265 | | |
1266 | 1266 | | |
1267 | 1267 | | |
| |||
1309 | 1309 | | |
1310 | 1310 | | |
1311 | 1311 | | |
| 1312 | + | |
1312 | 1313 | | |
1313 | 1314 | | |
1314 | 1315 | | |
1315 | 1316 | | |
1316 | 1317 | | |
1317 | 1318 | | |
1318 | 1319 | | |
1319 | | - | |
1320 | 1320 | | |
1321 | 1321 | | |
1322 | 1322 | | |
| |||
0 commit comments