@@ -742,7 +741,7 @@ static noinline int device_list_add(const char *path,
        if (!fs_devices) {
                fs_devices = alloc_fs_devices(disk_super->fsid);
                if (IS_ERR(fs_devices))
-                       return PTR_ERR(fs_devices);
+                       return ERR_PTR(PTR_ERR(fs_devices));

No need to do any conversion, alloc_fs_devices already returns ERR_PTR
value so plain return fs_devices suffices.

  'return fs_devices;' will get compile time warn as the
  function return is of type btrfs_device *.

list_add(&fs_devices->list, &fs_uuids); @@ -754,19 +753,19 @@ static noinline int device_list_add(const char *path, if (!device) {
                if (fs_devices->opened)
-                       return -EBUSY;
+                       return ERR_PTR(-EBUSY);
device = btrfs_alloc_device(NULL, &devid,
                                            disk_super->dev_item.uuid);
                if (IS_ERR(device)) {
                        /* we can safely leave the fs_devices entry around */
-                       return PTR_ERR(device);
+                       return ERR_PTR(PTR_ERR(device));
Ditto

 Here I will fix.

Thanks, Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to