aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-debug.h
diff options
context:
space:
mode:
authorKees Cook <[email protected]>2023-01-27 14:52:07 -0800
committerMark Brown <[email protected]>2023-01-28 11:27:57 +0000
commit4fd8bcec5fd7c0d586206fa2f42bd67b06cdaa7e (patch)
tree04f3320d70956dc3c348868c6ee806a68dcc9a73 /drivers/usb/cdns3/cdns3-debug.h
parentfad8ddda1c40c00bff4ac45eb9b85e1f717f17f4 (diff)
regulator: max77802: Bounds check regulator id against opmode
Explicitly bounds-check the id before accessing the opmode array. Seen with GCC 13: ../drivers/regulator/max77802-regulator.c: In function 'max77802_enable': ../drivers/regulator/max77802-regulator.c:217:29: warning: array subscript [0, 41] is outside array bounds of 'unsigned int[42]' [-Warray-bounds=] 217 | if (max77802->opmode[id] == MAX77802_OFF_PWRREQ) | ~~~~~~~~~~~~~~~~^~~~ ../drivers/regulator/max77802-regulator.c:62:22: note: while referencing 'opmode' 62 | unsigned int opmode[MAX77802_REG_MAX]; | ^~~~~~ Cc: Javier Martinez Canillas <[email protected]> Cc: Liam Girdwood <[email protected]> Cc: Mark Brown <[email protected]> Signed-off-by: Kees Cook <[email protected]> Acked-by: Javier Martinez Canillas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-debug.h')
0 files changed, 0 insertions, 0 deletions