diff options
author | Li Nan <linan122@huawei.com> | 2024-02-26 06:14:37 +0300 |
---|---|---|
committer | Song Liu <song@kernel.org> | 2024-02-26 21:22:22 +0300 |
commit | 4e26593944e02446a75d911e11b759a9320c8273 (patch) | |
tree | 571f7f0ec516eee6e18988212ba381fb4fec8441 /drivers | |
parent | 2fe4ffc3ecdcb69d0e5aded5abf5367e3519bd04 (diff) | |
download | linux-4e26593944e02446a75d911e11b759a9320c8273.tar.xz |
md: changed the switch of RAID_VERSION to if
There is only one case of this 'switch'. Change it to 'if'.
Signed-off-by: Li Nan <linan122@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20240226031444.3606764-3-linan666@huaweicloud.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/md.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index eedb9e343840..3c8a0784cf6a 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -7613,12 +7613,8 @@ static int md_ioctl(struct block_device *bdev, blk_mode_t mode, * Commands dealing with the RAID driver but not any * particular array: */ - switch (cmd) { - case RAID_VERSION: - err = get_version(argp); - goto out; - default:; - } + if (cmd == RAID_VERSION) + return get_version(argp); /* * Commands creating/starting a new array: |