Skip to content

Commit 4e26593

Browse files
Li Nanliu-song-6
authored andcommitted
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 <[email protected]> Signed-off-by: Song Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 2fe4ffc commit 4e26593

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/md/md.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7613,12 +7613,8 @@ static int md_ioctl(struct block_device *bdev, blk_mode_t mode,
76137613
* Commands dealing with the RAID driver but not any
76147614
* particular array:
76157615
*/
7616-
switch (cmd) {
7617-
case RAID_VERSION:
7618-
err = get_version(argp);
7619-
goto out;
7620-
default:;
7621-
}
7616+
if (cmd == RAID_VERSION)
7617+
return get_version(argp);
76227618

76237619
/*
76247620
* Commands creating/starting a new array:

0 commit comments

Comments
 (0)