lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <297c9d42-14ed-8972-d3f0-954a6fe9859f@linux.ibm.com>
Date:   Mon, 3 Aug 2020 09:18:07 +0200
From:   Harald Freudenberger <freude@...ux.ibm.com>
To:     Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
Cc:     hca@...ux.ibm.com, gor@...ux.ibm.com, borntraeger@...ibm.com,
        ifranzki@...ux.ibm.com, linux-s390@...r.kernel.org,
        linux-kernel@...r.kernel.org, tianjia.zhang@...baba.com
Subject: Re: [PATCH] s390/pkey: Remove redundant variable initialization

On 02.08.20 13:15, Tianjia Zhang wrote:
> In the first place, the initialization value of `rc` is wrong.
> It is unnecessary to initialize `rc` variables, so remove their
> initialization operation.
>
> Fixes: f2bbc96e7cfad ("s390/pkey: add CCA AES cipher key support")
> Cc: Harald Freudenberger <freude@...ux.ibm.com>
> Signed-off-by: Tianjia Zhang <tianjia.zhang@...ux.alibaba.com>
> ---
>  drivers/s390/crypto/pkey_api.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/s390/crypto/pkey_api.c b/drivers/s390/crypto/pkey_api.c
> index 74e63ec49068..58140506a8e7 100644
> --- a/drivers/s390/crypto/pkey_api.c
> +++ b/drivers/s390/crypto/pkey_api.c
> @@ -818,7 +818,7 @@ static int pkey_keyblob2pkey2(const struct pkey_apqn *apqns, size_t nr_apqns,
>  static int pkey_apqns4key(const u8 *key, size_t keylen, u32 flags,
>  			  struct pkey_apqn *apqns, size_t *nr_apqns)
>  {
> -	int rc = EINVAL;
> +	int rc;
>  	u32 _nr_apqns, *_apqns = NULL;
>  	struct keytoken_header *hdr = (struct keytoken_header *)key;
>  
> @@ -886,7 +886,7 @@ static int pkey_apqns4keytype(enum pkey_key_type ktype,
>  			      u8 cur_mkvp[32], u8 alt_mkvp[32], u32 flags,
>  			      struct pkey_apqn *apqns, size_t *nr_apqns)
>  {
> -	int rc = -EINVAL;
> +	int rc;
>  	u32 _nr_apqns, *_apqns = NULL;
>  
>  	if (ktype == PKEY_TYPE_CCA_DATA || ktype == PKEY_TYPE_CCA_CIPHER) {
Thanks, I've picked this one and committed to the s390 subsystem.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ