diff options
| author | Michal Simek <[email protected]> | 2026-04-29 08:22:08 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-05-04 12:56:08 -0600 |
| commit | 7dd93524eacfec8512700056fcb54a4ba5c8fd8b (patch) | |
| tree | 0229f5bdac38cad05e24129b7f20e466149ed1a7 /lib | |
| parent | c7a6d4fdd7d40c5a3da11cd1ab298ca2c8b7f18b (diff) | |
fdt: check fdt_pack() return value in fdtdec_apply_bloblist_dtos()
The fdt_pack() function can return an error code, but its return value
was not being checked. Add proper error handling to propagate any
failure.
Also fix typo in comment: "Shink" -> "Shrink".
Addresses-Coverity-ID: CID 645839: Error handling issues (CHECKED_RETURN)
Signed-off-by: Michal Simek <[email protected]>
Reviewed-by: Alexander Sverdlin <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Raymond Mao <[email protected]>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/fdtdec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c index c6e13b6abef..2d66860f6ed 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -1781,8 +1781,11 @@ static int fdtdec_apply_bloblist_dtos(void) if (ret) return ret; - /* Shink the blob to the actual FDT size */ - fdt_pack(live_fdt); + /* Shrink the blob to the actual FDT size */ + ret = fdt_pack(live_fdt); + if (ret) + return ret; + return bloblist_resize(BLOBLISTT_CONTROL_FDT, fdt_totalsize(live_fdt)); } |
