]> xenbits.xensource.com Git - libvirt.git/commitdiff
node: udev: Remove some redundant error reports
authorPeter Krempa <pkrempa@redhat.com>
Wed, 15 Apr 2015 12:49:14 +0000 (14:49 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 15 Apr 2015 13:20:12 +0000 (15:20 +0200)
All the called functions already report an error.

src/node_device/node_device_udev.c

index 8c39e5f0f4414b46bfe5e5ffc995575309afe801..1025e802d1bc53811cbec1a879fe5374c688c394 100644 (file)
@@ -128,9 +128,6 @@ static int udevGetDeviceProperty(struct udev_device *udev_device,
     /* If this allocation is changed, the comment at the beginning
      * of the function must also be changed. */
     if (VIR_STRDUP(*property_value, udev_value) < 0) {
-        VIR_ERROR(_("Failed to allocate memory for property value for "
-                    "property key '%s' on device with sysname '%s'"),
-                  property_key, udev_device_get_sysname(udev_device));
         ret = PROPERTY_ERROR;
         goto out;
     }
@@ -213,9 +210,6 @@ static int udevGetDeviceSysfsAttr(struct udev_device *udev_device,
     /* If this allocation is changed, the comment at the beginning
      * of the function must also be changed. */
     if (VIR_STRDUP(*attr_value, udev_value) < 0) {
-        VIR_ERROR(_("Failed to allocate memory for sysfs attribute value for "
-                    "sysfs attribute '%s' on device with sysname '%s'"),
-                  attr_name, udev_device_get_sysname(udev_device));
         ret = PROPERTY_ERROR;
         goto out;
     }
@@ -1428,11 +1422,8 @@ static int udevAddOneDevice(struct udev_device *device)
     /* If this is a device change, the old definition will be freed
      * and the current definition will take its place. */
     dev = virNodeDeviceAssignDef(&driver->devs, def);
-
-    if (dev == NULL) {
-        VIR_ERROR(_("Failed to create device for '%s'"), def->name);
+    if (dev == NULL)
         goto out;
-    }
 
     virNodeDeviceObjUnlock(dev);
 
@@ -1686,10 +1677,8 @@ static int udevSetupSystemDev(void)
 #endif
 
     dev = virNodeDeviceAssignDef(&driver->devs, def);
-    if (dev == NULL) {
-        VIR_ERROR(_("Failed to create device for '%s'"), def->name);
+    if (dev == NULL)
         goto out;
-    }
 
     virNodeDeviceObjUnlock(dev);