Fix newly found linter issues (#3099)

Fixes the issues found in
https://github.com/matrix-org/dendrite/actions/runs/5155539352/jobs/9285342056#step:5:22.
Only naked returns in longer functions.
This commit is contained in:
Till 2023-06-02 15:48:04 +02:00 committed by GitHub
parent ea6b368ad4
commit d11da6ec7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 9 deletions

View file

@ -644,7 +644,7 @@ func (d *Database) CreateDevice(
for i := 1; i <= 5; i++ {
newDeviceID, returnErr = generateDeviceID()
if returnErr != nil {
return
return nil, returnErr
}
returnErr = d.Writer.Do(d.DB, nil, func(txn *sql.Tx) error {
@ -653,7 +653,7 @@ func (d *Database) CreateDevice(
return err
})
if returnErr == nil {
return
return dev, nil
}
}
}