From: markj Date: Thu, 12 Sep 2019 16:47:38 +0000 (+0000) Subject: Remove a redundant NULL pointer check in cpuset_modify_domain(). X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=e17b9d0e4baf9a92f4e150b2cba7af85ff610098;p=freebsd.git Remove a redundant NULL pointer check in cpuset_modify_domain(). cpuset_getroot() is guaranteed to return a non-NULL pointer. Reported by: Mark Millard MFC after: 1 week Sponsored by: The FreeBSD Foundation --- diff --git a/sys/kern/kern_cpuset.c b/sys/kern/kern_cpuset.c index d42fcda80b5..2a2b1f8f7a2 100644 --- a/sys/kern/kern_cpuset.c +++ b/sys/kern/kern_cpuset.c @@ -796,7 +796,7 @@ cpuset_modify_domain(struct cpuset *set, struct domainset *domain) /* * Verify that we have access to this set of domains. */ - if (root && !domainset_valid(dset, domain)) { + if (!domainset_valid(dset, domain)) { error = EINVAL; goto out; }