etcdserver: remove unnecessary if-statement
@@ -156,10 +156,7 @@ func checkTxnAuth(as auth.AuthStore, ai *auth.AuthInfo, rt *pb.TxnRequest) error
if err := checkTxnReqsPermission(as, ai, rt.Success); err != nil {
return err
}
- if err := checkTxnReqsPermission(as, ai, rt.Failure); err != nil {
- return err
- }
- return nil
+ return checkTxnReqsPermission(as, ai, rt.Failure)
}
func (aa *authApplierV3) Txn(rt *pb.TxnRequest) (*pb.TxnResponse, error) {
