Blame SOURCES/0022-libndctl-Remove-redundant-checks-and-assignments.patch

2eb93d
From 561af4f919b3f1b3d1a213137f1d024420996d56 Mon Sep 17 00:00:00 2001
2eb93d
From: Santosh Sivaraj <santosh@fossix.org>
2eb93d
Date: Sun, 28 Mar 2021 05:43:51 +0530
2eb93d
Subject: [PATCH 022/217] libndctl: Remove redundant checks and assignments
2eb93d
2eb93d
check_udev already checks for udev allocation failure, remove the redundant
2eb93d
check.
2eb93d
2eb93d
Link: https://lore.kernel.org/r/20210328001351.2245032-1-santosh@fossix.org
2eb93d
Signed-off-by: Santosh Sivaraj <santosh@fossix.org>
2eb93d
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
2eb93d
---
2eb93d
 ndctl/lib/libndctl.c | 9 +++------
2eb93d
 1 file changed, 3 insertions(+), 6 deletions(-)
2eb93d
2eb93d
diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c
2eb93d
index bf0968c..3a496ed 100644
2eb93d
--- a/ndctl/lib/libndctl.c
2eb93d
+++ b/ndctl/lib/libndctl.c
2eb93d
@@ -323,12 +323,9 @@ NDCTL_EXPORT int ndctl_new(struct ndctl_ctx **ctx)
2eb93d
 		dbg(c, "timeout = %ld\n", tmo);
2eb93d
 	}
2eb93d
 
2eb93d
-	if (udev) {
2eb93d
-		c->udev = udev;
2eb93d
-		c->udev_queue = udev_queue_new(udev);
2eb93d
-		if (!c->udev_queue)
2eb93d
-			err(c, "failed to retrieve udev queue\n");
2eb93d
-	}
2eb93d
+	c->udev_queue = udev_queue_new(udev);
2eb93d
+	if (!c->udev_queue)
2eb93d
+		err(c, "failed to retrieve udev queue\n");
2eb93d
 
2eb93d
 	c->kmod_ctx = kmod_ctx;
2eb93d
 	c->daxctl_ctx = daxctl_ctx;
2eb93d
-- 
2eb93d
2.27.0
2eb93d