diff mbox series

[03/13] of: unittest: Fix overlay type in apply/revert check

Message ID db73c3165fb8f02934963b411723837c0712da0a.1689776064.git.geert+renesas@glider.be (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show
Series of: overlay/unittest: Miscellaneous fixes and improvements | expand

Commit Message

Geert Uytterhoeven July 19, 2023, 3 p.m. UTC
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>
---
 drivers/of/unittest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index a406a12eb20804d6..840f26477f77f622 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -2180,7 +2180,7 @@  static int __init of_unittest_apply_revert_overlay_check(int overlay_nr,
 	of_unittest_untrack_overlay(save_ovcs_id);
 
 	/* 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),