Message ID | 20240226031444.3606764-3-linan666@huaweicloud.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
Series | bugfix of MD_CLOSING and clean up md_ioctl() | expand |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 332eda680aea..b783a64765a7 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -7612,12 +7612,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: