In mc_fixup_dpc_mac_addr noff is assigned the return value from
fdt_add_subnode so that is the variable that should be passed to
fdt_strerror and returned when negative.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
noff = fdt_add_subnode(blob, nodeoffset, mac_name);
if (noff < 0) {
printf("fdt_add_subnode: err=%s\n",
- fdt_strerror(err));
- return err;
+ fdt_strerror(noff));
+ return noff;
}
/* add default property of fixed link */