All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Cc: linux-nvdimm-y27Ovi1pjclAfugRpC6u6w@public.gmane.org
Subject: [PATCH 3/3] validate_namespace_options: fix bogus test
Date: Thu, 23 Jun 2016 15:59:50 -0400	[thread overview]
Message-ID: <20160623195950.30968-4-jmoyer@redhat.com> (raw)
In-Reply-To: <20160623195950.30968-1-jmoyer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Another coverity find.  The patch is self-explanatory, I hope.

Signed-off-by: Jeff Moyer <jmoyer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 ndctl/builtin-xaction-namespace.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ndctl/builtin-xaction-namespace.c b/ndctl/builtin-xaction-namespace.c
index 8ce7c3e..7411a01 100644
--- a/ndctl/builtin-xaction-namespace.c
+++ b/ndctl/builtin-xaction-namespace.c
@@ -444,7 +444,8 @@ static int validate_namespace_options(struct ndctl_region *region,
 				ndctl_namespace_get_devname(ndns));
 			return -EINVAL;
 		}
-	} else if (p->mode == NDCTL_NS_MODE_MEMORY || NDCTL_NS_MODE_DAX)
+	} else if (p->mode == NDCTL_NS_MODE_MEMORY ||
+		   p->mode == NDCTL_NS_MODE_DAX)
 		p->loc = NDCTL_PFN_LOC_PMEM;
 
 	/* check if we need, and whether the kernel supports, pfn devices */
-- 
2.8.2.335.g4bb51ae

      parent reply	other threads:[~2016-06-23 19:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23 19:59 [PATCH 0/3] Misc. ndctl fixes Jeff Moyer
     [not found] ` <20160623195950.30968-1-jmoyer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-23 19:59   ` [PATCH 1/3] util_namespace_to_json: fix potential null pointer dereference Jeff Moyer
     [not found]     ` <20160623195950.30968-2-jmoyer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-06-23 20:12       ` Dan Williams
2016-06-23 19:59   ` [PATCH 2/3] daxctl_region_unref: fix a " Jeff Moyer
2016-06-23 19:59   ` Jeff Moyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160623195950.30968-4-jmoyer@redhat.com \
    --to=jmoyer-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-nvdimm-y27Ovi1pjclAfugRpC6u6w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.