]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-device: use device_add_property() at one more place
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 9 Mar 2026 04:30:02 +0000 (13:30 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 9 Mar 2026 18:05:15 +0000 (03:05 +0900)
src/libsystemd/sd-device/sd-device.c

index 526f183b1e9ece6c89427056aef5c93a80ca5b12..a314f65cb23aec17a8a880e41f3abbbeda6408a2 100644 (file)
@@ -1628,7 +1628,6 @@ bool device_has_devlink(sd_device *device, const char *devlink) {
 static int device_add_property_internal_from_string(sd_device *device, const char *str) {
         _cleanup_free_ char *key = NULL;
         char *value;
-        int r;
 
         assert(device);
         assert(str);
@@ -1648,11 +1647,7 @@ static int device_add_property_internal_from_string(sd_device *device, const cha
 
         /* Add the property to both sd_device::properties and sd_device::properties_db,
          * as this is called by only handle_db_line(). */
-        r = device_add_property_aux(device, key, value, false);
-        if (r < 0)
-                return r;
-
-        return device_add_property_aux(device, key, value, true);
+        return device_add_property(device, key, value);
 }
 
 int device_set_usec_initialized(sd_device *device, usec_t when) {