summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2020-07-03 13:33:15 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-29 11:16:53 +0300
commit545f4f98e29e2c8346b83c3f42df0a3d907c4df9 (patch)
tree18854eef60a0907ff389829631568bc390b8b371 /drivers/hwmon
parentd3703082e838681cdb98700b9c1cceefc644e5cc (diff)
downloadlinux-545f4f98e29e2c8346b83c3f42df0a3d907c4df9.tar.xz
regmap: dev_get_regmap_match(): fix string comparison
[ Upstream commit e84861fec32dee8a2e62bbaa52cded6b05a2a456 ] This function is used by dev_get_regmap() to retrieve a regmap for the specified device. If the device has more than one regmap, the name parameter can be used to specify one. The code here uses a pointer comparison to check for equal strings. This however will probably always fail, as the regmap->name is allocated via kstrdup_const() from the regmap's config->name. Fix this by using strcmp() instead. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Link: https://lore.kernel.org/r/20200703103315.267996-1-mkl@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/hwmon')
0 files changed, 0 insertions, 0 deletions