diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 1058e23eca7d..412d7ddb3b8b 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -2067,7 +2067,7 @@ static int __init of_unittest_apply_revert_overlay_check(int overlay_nr, of_unittest_untrack_overlay(save_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),