aboutsummaryrefslogtreecommitdiff
path: root/userapi
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2023-06-02 15:48:04 +0200
committerGitHub <noreply@github.com>2023-06-02 15:48:04 +0200
commitd11da6ec7cc683864e1e10b7f47764d1bb0c4f1a (patch)
treec052ca6bb1f812d4cf91609e067f2736f969e0a3 /userapi
parentea6b368ad424a3d2e05135afb7fd0c0801b3609b (diff)
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.
Diffstat (limited to 'userapi')
-rw-r--r--userapi/storage/shared/storage.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/userapi/storage/shared/storage.go b/userapi/storage/shared/storage.go
index 70570757..537bbbf4 100644
--- a/userapi/storage/shared/storage.go
+++ b/userapi/storage/shared/storage.go
@@ -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
}
}
}