diff mbox series

tools: mkeficapsule: remove duplicated code

Message ID 20220216014951.42724-1-takahiro.akashi@linaro.org
State Accepted
Commit 625d933eddc9aa3137ab6cc31f54a2f3404d937a
Headers show
Series tools: mkeficapsule: remove duplicated code | expand

Commit Message

AKASHI Takahiro Feb. 16, 2022, 1:49 a.m. UTC
That code is mistakenly duplicated due to copy-and-paste error.
Just remove it.

Fixes: CID 348360
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
 tools/mkeficapsule.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Heinrich Schuchardt Feb. 19, 2022, 9:20 a.m. UTC | #1
On 2/16/22 02:49, AKASHI Takahiro wrote:
> That code is mistakenly duplicated due to copy-and-paste error.
> Just remove it.
>
> Fixes: CID 348360
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

> ---
>   tools/mkeficapsule.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/tools/mkeficapsule.c b/tools/mkeficapsule.c
> index f7590e482f10..c118335b93bd 100644
> --- a/tools/mkeficapsule.c
> +++ b/tools/mkeficapsule.c
> @@ -210,8 +210,6 @@ static int create_auth_data(struct auth_context *ctx)
>   	cert.size = file_size;
>
>   	ret = read_bin_file(ctx->key_file, &key.data, &file_size);
> -	if (ret < 0)
> -		return -1;
>   	if (ret < 0)
>   		return -1;
>   	if (file_size > UINT_MAX)
diff mbox series

Patch

diff --git a/tools/mkeficapsule.c b/tools/mkeficapsule.c
index f7590e482f10..c118335b93bd 100644
--- a/tools/mkeficapsule.c
+++ b/tools/mkeficapsule.c
@@ -210,8 +210,6 @@  static int create_auth_data(struct auth_context *ctx)
 	cert.size = file_size;
 
 	ret = read_bin_file(ctx->key_file, &key.data, &file_size);
-	if (ret < 0)
-		return -1;
 	if (ret < 0)
 		return -1;
 	if (file_size > UINT_MAX)