Skip to content
Unverified Commit e84861fe authored by Marc Kleine-Budde's avatar Marc Kleine-Budde Committed by Mark Brown
Browse files

regmap: dev_get_regmap_match(): fix string comparison



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: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Link: https://lore.kernel.org/r/20200703103315.267996-1-mkl@pengutronix.de


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 95b2c3ec
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