diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-10-18 19:30:03 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-10-18 19:30:03 +0300 |
commit | e1e80380f1c25aec736ce1a2e46fac9f9631b71a (patch) | |
tree | 4395b248bf8ec01be915ee07b1397260c7549a95 /drivers/base | |
parent | 06dc10eae55b5ceabfef287a7e5f16ceea204aa0 (diff) | |
parent | c6df843348d6b71ea986266c12831cb60c2cf325 (diff) | |
download | linux-e1e80380f1c25aec736ce1a2e46fac9f9631b71a.tar.xz |
Merge tag 'regmap-fix-v6.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
Pull regmap fix from Mark Brown:
"A straightforward fix from Johan for a long standing bug in cases
where we both have regmaps without devices and something is using
dev_get_regmap()"
* tag 'regmap-fix-v6.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
regmap: fix NULL deref on lookup
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/regmap/regmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 884cb51c8f67..234a84ecde8b 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -1478,7 +1478,7 @@ static int dev_get_regmap_match(struct device *dev, void *res, void *data) /* If the user didn't specify a name match any */ if (data) - return !strcmp((*r)->name, data); + return (*r)->name && !strcmp((*r)->name, data); else return 1; } |