diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2023-07-28 10:50:29 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-09-23 10:48:04 +0200 |
commit | b72987dd5b5b4559f825d44d11646a0015bf3006 (patch) | |
tree | 880b7b17447841ed0f8ab109e630c97248160efe | |
parent | 1640c7bd4eddec6c72f3a99cbb74e333a2ce9f5d (diff) | |
download | linux-stable-b72987dd5b5b4559f825d44d11646a0015bf3006.tar.gz linux-stable-b72987dd5b5b4559f825d44d11646a0015bf3006.tar.bz2 linux-stable-b72987dd5b5b4559f825d44d11646a0015bf3006.zip |
of: unittest: Fix overlay type in apply/revert check
[ Upstream commit 6becf8f845ae1f0b1cfed395bbeccbd23654162d ]
The removal check in of_unittest_apply_revert_overlay_check()
always uses the platform device overlay type, while it should use the
actual overlay type, as passed as a parameter to the function.
This has no impact on any current test, as all tests calling
of_unittest_apply_revert_overlay_check() use the platform device overlay
type.
Fixes: d5e75500ca401d31 ("of: unitest: Add I2C overlay unit tests.")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/ba0234c41ba808f10112094f88792beeb6dbaedf.1690533838.git.geert+renesas@glider.be
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/of/unittest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 59dc68a1d8ff..2515ce393005 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -1573,7 +1573,7 @@ static int __init of_unittest_apply_revert_overlay_check(int overlay_nr, } /* unittest device must be again in before state */ - if (of_unittest_device_exists(unittest_nr, PDEV_OVERLAY) != before) { + if (of_unittest_device_exists(unittest_nr, ovtype) != before) { unittest(0, "%s with device @\"%s\" %s\n", overlay_name_from_nr(overlay_nr), unittest_path(unittest_nr, ovtype), |