Skip to content

Commit

Permalink
md/raid5: remove pointless NULL test.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
NeilBrown committed Oct 7, 2011
1 parent ce550c2 commit e4f869d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e4f869d

Please sign in to comment.