diff mbox series

[ndctl,4/4] load-keys: get rid of duplicate assignment

Message ID 20191018202302.8122-5-jmoyer@redhat.com (mailing list archive)
State New, archived
Headers show
Series misc. cleanups | expand

Commit Message

Jeff Moyer Oct. 18, 2019, 8:23 p.m. UTC
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
---
 ndctl/load-keys.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Ira Weiny Oct. 18, 2019, 8:57 p.m. UTC | #1
On Fri, Oct 18, 2019 at 04:23:02PM -0400, Jeff Moyer wrote:
> Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

Reviewed-by: Ira Weiny <ira.weiny@intel.com>

> ---
>  ndctl/load-keys.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/ndctl/load-keys.c b/ndctl/load-keys.c
> index 981f80f..f0b7a5a 100644
> --- a/ndctl/load-keys.c
> +++ b/ndctl/load-keys.c
> @@ -185,7 +185,6 @@ static int load_keys(struct loadkeys *lk_ctx, const char *keypath,
>  
>  	rc = chdir(keypath);
>  	if (rc < 0) {
> -		rc = -errno;
>  		fprintf(stderr, "Change current work dir to %s failed: %s\n",
>  				param.key_path, strerror(errno));
>  		rc = -errno;
> -- 
> 2.19.1
> _______________________________________________
> Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
> To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
diff mbox series

Patch

diff --git a/ndctl/load-keys.c b/ndctl/load-keys.c
index 981f80f..f0b7a5a 100644
--- a/ndctl/load-keys.c
+++ b/ndctl/load-keys.c
@@ -185,7 +185,6 @@  static int load_keys(struct loadkeys *lk_ctx, const char *keypath,
 
 	rc = chdir(keypath);
 	if (rc < 0) {
-		rc = -errno;
 		fprintf(stderr, "Change current work dir to %s failed: %s\n",
 				param.key_path, strerror(errno));
 		rc = -errno;