diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index a08c9e2d5c4cfc83e32c959b77c79b7c74f6b045..02c5984ab09b038023557eecc40bc8b39a3f4ba6 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -1423,15 +1423,13 @@ static int __init of_unittest_apply_overlay(int overlay_nr, int unittest_nr, int *overlay_id) { const char *overlay_name; - int ret; overlay_name = overlay_name_from_nr(overlay_nr); - ret = overlay_data_apply(overlay_name, overlay_id); - if (!ret) { + if (!overlay_data_apply(overlay_name, overlay_id)) { unittest(0, "could not apply overlay \"%s\"\n", overlay_name); - return ret; + return -EFAULT; } of_unittest_track_overlay(*overlay_id);