Commit 28a38e20 authored by Xichao Zhao's avatar Xichao Zhao Committed by David Sterba
Browse files

btrfs: use PTR_ERR_OR_ZERO() to simplify code inbtrfs_control_ioctl()



Use the standard error pointer macro to simplify the code.

Reviewed-by: default avatarDaniel Vacek <neelx@suse.com>
Signed-off-by: default avatarXichao Zhao <zhao.xichao@vivo.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent d728f2e5
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -2274,10 +2274,7 @@ static long btrfs_control_ioctl(struct file *file, unsigned int cmd,
		device = btrfs_scan_one_device(vol->name, false);
		if (IS_ERR_OR_NULL(device)) {
			mutex_unlock(&uuid_mutex);
			if (IS_ERR(device))
				ret = PTR_ERR(device);
			else
				ret = 0;
			ret = PTR_ERR_OR_ZERO(device);
			break;
		}
		ret = !(device->fs_devices->num_devices ==