Skip to content

Commit e1e8038

Browse files
committed
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
2 parents 06dc10e + c6df843 commit e1e8038

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/base/regmap/regmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1478,7 +1478,7 @@ static int dev_get_regmap_match(struct device *dev, void *res, void *data)
14781478

14791479
/* If the user didn't specify a name match any */
14801480
if (data)
1481-
return !strcmp((*r)->name, data);
1481+
return (*r)->name && !strcmp((*r)->name, data);
14821482
else
14831483
return 1;
14841484
}

0 commit comments

Comments
 (0)