mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-04 17:47:03 +03:00
logind: propagate the right error, don't make up ENOMEM
This commit is contained in:
parent
5d5330a8e4
commit
e38aa66426
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user