diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index ef3c2112046f..42acbb3668b2 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -1582,7 +1582,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),