Skip to content
Snippets Groups Projects
Commit 22929bec authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

rkcommon.c: Drop pointless assignment


Assigning a variable to itself is not necessary. Drop this and also add a
check for malloc() failure.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Reported-by: Coverity (CID: 161418)
Fixes: 111bcc4f (rockchip: mkimage: pad the header to 8-bytes (using a 'nop') for RK3399)
parent baa7d345
No related branches found
No related tags found
No related merge requests found
...@@ -380,8 +380,9 @@ int rkcommon_vrec_header(struct image_tool_params *params, ...@@ -380,8 +380,9 @@ int rkcommon_vrec_header(struct image_tool_params *params,
/* Allocate, clear and install the header */ /* Allocate, clear and install the header */
tparams->hdr = malloc(tparams->header_size); tparams->hdr = malloc(tparams->header_size);
if (!tparams->hdr)
return -ENOMEM;
memset(tparams->hdr, 0, tparams->header_size); memset(tparams->hdr, 0, tparams->header_size);
tparams->header_size = tparams->header_size;
/* /*
* If someone passed in 0 for the alignment, we'd better handle * If someone passed in 0 for the alignment, we'd better handle
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment