From 752a043692f6f5aa1fc9be82db10b80ad877577e Mon Sep 17 00:00:00 2001 From: Shingo Omura Date: Sat, 14 Jun 2025 15:10:32 +0900 Subject: [PATCH] fix lint: apply De Morgan's laws to simplify conditionals Signed-off-by: Shingo Omura --- staging/src/k8s.io/dynamic-resource-allocation/utils/pci.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staging/src/k8s.io/dynamic-resource-allocation/utils/pci.go b/staging/src/k8s.io/dynamic-resource-allocation/utils/pci.go index 69f765a6a33..91b5eab6d0c 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/utils/pci.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/utils/pci.go @@ -113,7 +113,7 @@ func (p *PCIAddress) resolveSysDevicesPath(sysfs Sysfs) (string, error) { // targetAbs must be /sys/devices/pci0000:01/....../0000:00:1f.0 devicePathPrefix := sysfs.Devices("pci") - if !strings.HasPrefix(targetAbs, devicePathPrefix) || !(filepath.Base(targetAbs) == p.String()) { + if !strings.HasPrefix(targetAbs, devicePathPrefix) || filepath.Base(targetAbs) != p.String() { return "", fmt.Errorf("invalid symlink target for PCI device %s: %s", sysBusPath, targetAbs) }