]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
logind: propagate the right error, don't make up ENOMEM
authorLennart Poettering <lennart@poettering.net>
Mon, 26 Feb 2018 17:33:05 +0000 (18:33 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 26 Feb 2018 17:33:05 +0000 (18:33 +0100)
src/login/logind-session-device.c

index 0992f26d653200bb6d60c3cec913b756ded7cf79..30e29e122cb38a000c8d1c0c04b27c9f6ba5fd4a 100644 (file)
@@ -370,10 +370,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