Commit 5c018e3
spi: spi-rockchip: Fix out of bounds array access
Since spi-rockchip enables use_gpio_descriptors and the
SPI_CONTROLLER_GPIO_SS flag, the spi subsytem may call set_cs()
for spi devices with indexes above ROCKCHIP_SPI_MAX_CS_NUM
Remove array cs_asserted[] which held a shadow copy of the state
of the chip select lines with the only purpose of optimizing out
rewriting a chip select line to the current state (no-op)
This case is already handled by spi.c
Signed-off-by: Luis de Arquer <luis.dearquer@inertim.com>
Link: https://lore.kernel.org/r/d0a0c4b94f933f7f43973c34765214303ee82b77.camel@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent 83c9c7e commit 5c018e3
1 file changed
+0
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | | - | |
197 | 195 | | |
198 | 196 | | |
199 | 197 | | |
| |||
245 | 243 | | |
246 | 244 | | |
247 | 245 | | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | 246 | | |
253 | 247 | | |
254 | 248 | | |
| |||
268 | 262 | | |
269 | 263 | | |
270 | 264 | | |
271 | | - | |
272 | | - | |
273 | 265 | | |
274 | 266 | | |
275 | 267 | | |
| |||
0 commit comments