firmware: tegra: Fix error check return value of debugfs_create_file()
authorLv Ruyi <lv.ruyi@zte.com.cn>
Tue, 19 Apr 2022 01:36:48 +0000 (01:36 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:04 +0000 (14:23 +0200)
commitc5a73bd9f11ace4f2879ebe2d9eb3fa150c8c261
treea1237807908c21561512f2eeb656e1f90408e68f
parentc53d904973cbea3728fe24dd737ff902a64d6f32
firmware: tegra: Fix error check return value of debugfs_create_file()

[ Upstream commit afcdb8e55c91c6ff0700ab272fd0f74e899ab884 ]

If an error occurs, debugfs_create_file() will return ERR_PTR(-ERROR),
so use IS_ERR() to check it.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/firmware/tegra/bpmp-debugfs.c