mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 14:30:53 +07:00
of: unittest: fix an error code in of_unittest_apply_overlay()
We accidentally return zero on failure instead of a negative error code.
Fixes: 39a751a4cb
("of: change overlay apply input data from unflattened to FDT")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
parent
202fbf4865
commit
827473268e
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user