md/raid5: remove pointless NULL test.
authorNeilBrown <neilb@suse.de>
Fri, 7 Oct 2011 03:22:49 +0000 (14:22 +1100)
committerNeilBrown <neilb@suse.de>
Fri, 7 Oct 2011 03:22:49 +0000 (14:22 +1100)
In the 'abort' branch of run(), 'conf' cannot possibly be NULL,
so remove the test.

Reported-by: Zdenek Kabelac <zdenek.kabelac@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid5.c

index ac5e8b57e50fbc2d788c0906263ce30ac56eeb60..6ab3434b23599aff7747e45e43ad955687e30512 100644 (file)
@@ -4942,10 +4942,8 @@ static int run(mddev_t *mddev)
        return 0;
 abort:
        md_unregister_thread(&mddev->thread);
-       if (conf) {
-               print_raid5_conf(conf);
-               free_conf(conf);
-       }
+       print_raid5_conf(conf);
+       free_conf(conf);
        mddev->private = NULL;
        printk(KERN_ALERT "md/raid:%s: failed to run raid set.\n", mdname(mddev));
        return -EIO;