Skip to content
Unverified Commit a5201d42 authored by Schspa Shi's avatar Schspa Shi Committed by Mark Brown
Browse files

regmap: cache: Add extra parameter check in regcache_init



When num_reg_defaults > 0 but reg_defaults is NULL, there will be a
NULL pointer exception.

Current code has no such usage, but as additional hardening, also
check this to prevent any chance of crashing.

Signed-off-by: default avatarSchspa Shi <schspa@gmail.com>
Link: https://lore.kernel.org/r/20220629130951.63040-1-schspa@gmail.com
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 06fae51b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment