chiark / gitweb /
udev: fix a few issues detected by the llvm static analyzer
[elogind.git] / src / udev / udev-builtin-blkid.c
index e57f03e5a18dff4241bad879a37ee5d8f3abfb59..fdc68d00a885d7be17bebc08c55ed81efb59e242 100644 (file)
@@ -115,7 +115,6 @@ static int probe_superblocks(blkid_probe pr)
 
 static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool test)
 {
-        struct udev *udev = udev_device_get_udev(dev);
         int64_t offset = 0;
         bool noraid = false;
         int fd = -1;
@@ -151,10 +150,8 @@ static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool t
         }
 
         pr = blkid_new_probe();
-        if (!pr) {
-                err = -ENOMEM;
+        if (!pr)
                 return EXIT_FAILURE;
-        }
 
         blkid_probe_set_superblocks_flags(pr,
                 BLKID_SUBLKS_LABEL | BLKID_SUBLKS_UUID |
@@ -174,9 +171,9 @@ static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool t
         if (err < 0)
                 goto out;
 
-        info(udev, "probe %s %sraid offset=%llu\n",
-             udev_device_get_devnode(dev),
-             noraid ? "no" : "", (unsigned long long) offset);
+        log_debug("probe %s %sraid offset=%llu\n",
+                  udev_device_get_devnode(dev),
+                  noraid ? "no" : "", (unsigned long long) offset);
 
         err = probe_superblocks(pr);
         if (err < 0)