]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
regmap: debugfs: Fix a erroneous check after snprintf()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 4 Sep 2023 20:04:06 +0000 (22:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:56:54 +0000 (11:56 +0100)
commit80a5d81d4cd25e7df50b6c836fcc4da61370f046
tree07e7b978ebfd4342c6b8944998245cf9a94f2b3b
parenta043d62101143fc37e9325a8b8e6e092bf98c735
regmap: debugfs: Fix a erroneous check after snprintf()

[ Upstream commit d3601857e14de6369f00ae19564f1d817d175d19 ]

This error handling looks really strange.
Check if the string has been truncated instead.

Fixes: f0c2319f9f19 ("regmap: Expose the driver name in debugfs")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/8595de2462c490561f70020a6d11f4d6b652b468.1693857825.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/base/regmap/regmap-debugfs.c