summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-02-26 18:33:05 +0100
committerSven Eden <yamakuzure@gmx.net>2018-05-30 07:59:06 +0200
commita33b748b1610f0d728009ec05c95870fa53c18b7 (patch)
treef3f77912ad81f7b9ed334f1b50145b2a2355ae4b /src
parent94f8dafc1c6c03d5ab3694941905578c3f39fc4c (diff)
logind: propagate the right error, don't make up ENOMEM
Diffstat (limited to 'src')
-rw-r--r--src/login/logind-session-device.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/login/logind-session-device.c b/src/login/logind-session-device.c
index b74f31a37..65a069012 100644
--- a/src/login/logind-session-device.c
+++ b/src/login/logind-session-device.c
@@ -374,10 +374,8 @@ int session_device_new(Session *s, dev_t dev, bool open_device, SessionDevice **
goto error;
r = hashmap_put(s->devices, &sd->dev, sd);
- if (r < 0) {
- r = -ENOMEM;
+ if (r < 0)
goto error;
- }
if (open_device) {
/* Open the device for the first time. We need a valid fd to pass back