# \[PATCH\] md: remove an unneeded condition in set\_array\_info.

- From: Wei Fang \<hidden\>
- Date: 2015-06-23 10:44:46 
- List: linux-raid
- Page: https://ratatoskr.run/linux-raid/2015/06/6629901
- Thread: https://ratatoskr.run/linux-raid/2015/06/6629901/t.md

```text
if ->major_version is legal, name can't be NULL, so remove it.

Signed-off-by: Wei Fang <redacted>
---
 drivers/md/md.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index d4f31e1..1c2f967 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -6193,12 +6193,10 @@ static int set_bitmap_file(struct mddev *mddev, int fd)
  */
 static int set_array_info(struct mddev *mddev, mdu_array_info_t *info)
 {
-
 	if (info->raid_disks == 0) {
 		/* just setting version number for superblock loading */
 		if (info->major_version < 0 ||
-		    info->major_version >= ARRAY_SIZE(super_types) ||
-		    super_types[info->major_version].name == NULL) {
+		    info->major_version >= ARRAY_SIZE(super_types)) {
 			/* maybe try to auto-load a module? */
 			printk(KERN_INFO
 				"md: superblock version %d not known\n",
-- 
1.8.3.1

```
