Merge tag 'thunderbolt-for-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
[platform/kernel/linux-starfive.git] / drivers / thunderbolt / switch.c
index da373ac..51e86b5 100644 (file)
@@ -271,9 +271,9 @@ static int nvm_authenticate(struct tb_switch *sw, bool auth_only)
                }
                sw->nvm->authenticating = true;
                return usb4_switch_nvm_authenticate(sw);
-       } else if (auth_only) {
-               return -EOPNOTSUPP;
        }
+       if (auth_only)
+               return -EOPNOTSUPP;
 
        sw->nvm->authenticating = true;
        if (!tb_route(sw)) {