regulator: Fix error checking for debugfs_create_dir
authorOsama Muhammad <osmtendev@gmail.com>
Mon, 15 May 2023 17:29:38 +0000 (22:29 +0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jun 2023 14:00:52 +0000 (16:00 +0200)
commitbf8324676b1c842c100aafcc850342d1492f24a8
tree4b3eaaafd326dd983aa2cb83d761aad5e52b0fd1
parentc94be1f039c334f63579f95b9f4338290fe555d4
regulator: Fix error checking for debugfs_create_dir

[ Upstream commit 2bf1c45be3b8f3a3f898d0756c1282f09719debd ]

This patch fixes the error checking in core.c in debugfs_create_dir.
The correct way to check if an error occurred is 'IS_ERR' inline function.

Signed-off-by: Osama Muhammad <osmtendev@gmail.com
Suggested-by: Ivan Orlov <ivan.orlov0322@gmail.com
Link: https://lore.kernel.org/r/20230515172938.13338-1-osmtendev@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/regulator/core.c