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

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