Commit b27cc6d
committed
iio: adc: ad4630: Fix possible use of uninitialized variable
Previously, due to return 0 after goto jump, '*val = temp;' could execute
with temp uninitialized if regmap_read() failed in
ad4630_get_avg_frame_len(). Prevent that by returning the actual error code
if regmap_read() fails in ad4630_get_avg_frame_len().
Suggested-by: Jorge Marques <[email protected]>
Fixes: 5bc31c5 ("iio: adc: ad4630: Use oversampling iio attribute for average mode")
Signed-off-by: Marcelo Schmitt <[email protected]>1 parent b903e79 commit b27cc6d
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
| 342 | + | |
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| |||
0 commit comments