md: remove an unneeded condition in set_array_info.

Started by Wei Fang on Jun 23, 2015

Subsystems (2)

Maintainers (3)

DORMANTno replies

open the first message on its own page

Message details and related content
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
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help