Skip to content
Commit eb717398 authored by 권오훈's avatar 권오훈 Committed by Rob Herring
Browse files

of: fdt: remove unnecessary codes



While unflattening the device tree, we try to populate dt nodes and
properties into tree-shaped data structure.

In populate_properties function, pprev is initially set to
&np->properties, and then updated to &pp->next.

In both scenarios *pprev is NULL, since the memory area that we are
allocating from is initially zeroed.

I tested the code as below, and it showed that BUG was never called.

-       if (!dryrun)
+       if (!dryrun) {
+               if (*pprev)
+                       BUG();
                *pprev = NULL;
+       }

Let's remove unnecessary code.

Signed-off-by: default avatarOhhoon Kwon <ohoono.kwon@samsung.com>
Link: https://lore.kernel.org/r/20210701140457epcms1p2cc43a7c62150f012619feab913f017af@epcms1p2


Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent ace1c4b5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment