]> xenbits.xensource.com Git - freebsd.git/commitdiff
Remove a redundant NULL pointer check in cpuset_modify_domain().
authormarkj <markj@FreeBSD.org>
Thu, 12 Sep 2019 16:47:38 +0000 (16:47 +0000)
committermarkj <markj@FreeBSD.org>
Thu, 12 Sep 2019 16:47:38 +0000 (16:47 +0000)
cpuset_getroot() is guaranteed to return a non-NULL pointer.

Reported by: Mark Millard <marklmi@yahoo.com>
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

sys/kern/kern_cpuset.c

index d42fcda80b51e29ba1b6dccc64cca4ff77357ad9..2a2b1f8f7a297e7ee0d391af3a613af9bf8a4488 100644 (file)
@@ -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;
                }