Commit 506a1ac
iio: bmi323: fix copy and paste bugs in suspend resume
This code is using bmi323_reg_savestate[] and ->reg_settings[] instead
of bmi323_ext_reg_savestate[] and ->ext_reg_settings[]. This was
discovered by Smatch:
drivers/iio/imu/bmi323/bmi323_core.c:2202 bmi323_core_runtime_suspend()
error: buffer overflow 'bmi323_reg_savestate' 9 <= 11
Fixes: 1653111 ("iio: bmi323: peripheral in lowest power state on suspend")
Signed-off-by: Dan Carpenter <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jonathan Cameron <[email protected]>1 parent cd8247c commit 506a1ac
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2198 | 2198 | | |
2199 | 2199 | | |
2200 | 2200 | | |
2201 | | - | |
2202 | | - | |
| 2201 | + | |
| 2202 | + | |
2203 | 2203 | | |
2204 | 2204 | | |
2205 | 2205 | | |
2206 | | - | |
| 2206 | + | |
2207 | 2207 | | |
2208 | 2208 | | |
2209 | 2209 | | |
| |||
2242 | 2242 | | |
2243 | 2243 | | |
2244 | 2244 | | |
2245 | | - | |
2246 | | - | |
| 2245 | + | |
| 2246 | + | |
2247 | 2247 | | |
2248 | 2248 | | |
2249 | 2249 | | |
2250 | | - | |
| 2250 | + | |
2251 | 2251 | | |
2252 | 2252 | | |
2253 | 2253 | | |
| |||
0 commit comments