From: Santosh Sivaraj <santosh@fossix.org>
To: Linux NVDIMM <linux-nvdimm@lists.01.org>,
Vishal Verma <vishal.l.verma@intel.com>
Cc: Santosh Sivaraj <santosh@fossix.org>
Subject: [PATCH] libndctl: Remove redundant checks and assignments
Date: Sun, 28 Mar 2021 05:43:51 +0530 [thread overview]
Message-ID: <20210328001351.2245032-1-santosh@fossix.org> (raw)
check_udev already checks for udev allocation failure, remove the redundant
check.
Signed-off-by: Santosh Sivaraj <santosh@fossix.org>
---
ndctl/lib/libndctl.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c
index 36fb6fe..262d758 100644
--- a/ndctl/lib/libndctl.c
+++ b/ndctl/lib/libndctl.c
@@ -323,12 +323,9 @@ NDCTL_EXPORT int ndctl_new(struct ndctl_ctx **ctx)
dbg(c, "timeout = %ld\n", tmo);
}
- if (udev) {
- c->udev = udev;
- c->udev_queue = udev_queue_new(udev);
- if (!c->udev_queue)
- err(c, "failed to retrieve udev queue\n");
- }
+ c->udev_queue = udev_queue_new(udev);
+ if (!c->udev_queue)
+ err(c, "failed to retrieve udev queue\n");
c->kmod_ctx = kmod_ctx;
c->daxctl_ctx = daxctl_ctx;
--
2.30.2
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
reply other threads:[~2021-03-28 0:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210328001351.2245032-1-santosh@fossix.org \
--to=santosh@fossix.org \
--cc=linux-nvdimm@lists.01.org \
--cc=vishal.l.verma@intel.com \
/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.