Re: [PATCH v2 10/19] rsatoc: check error value of gen_key()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01.08.24 07:57, Sascha Hauer wrote:
> exit with an error in case gen_key() fails, otherwise errors go through
> unnoticed.
> 
> Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>

Ah, nice that you caught this.

Reviewed-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>


> ---
>  scripts/rsatoc.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/rsatoc.c b/scripts/rsatoc.c
> index c7bc4ba843..27f0afe61f 100644
> --- a/scripts/rsatoc.c
> +++ b/scripts/rsatoc.c
> @@ -471,7 +471,7 @@ static int gen_key(const char *keyname, const char *path)
>  int main(int argc, char *argv[])
>  {
>  	char *path, *keyname;
> -	int i, opt;
> +	int i, opt, ret;
>  	char *outfile = NULL;
>  
>  	outfilep = stdout;
> @@ -542,7 +542,9 @@ int main(int argc, char *argv[])
>  			}
>  		}
>  
> -		gen_key(keyname, path);
> +		ret = gen_key(keyname, path);
> +		if (ret)
> +			exit(1);
>  	}
>  
>  	if (dts) {

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux