summaryrefslogtreecommitdiffstats
path: root/sys/geom/raid/md_sii.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2011-03-31 16:14:35 +0000
committermav <mav@FreeBSD.org>2011-03-31 16:14:35 +0000
commit8fca35a71a67ff324340e8a89c496eaef25f985a (patch)
treefe6c8457c3f4203fea7e8e1fe634699aa8853266 /sys/geom/raid/md_sii.c
parentd56170701edd485dd31c6c68254daab567f5d249 (diff)
downloadFreeBSD-src-8fca35a71a67ff324340e8a89c496eaef25f985a.zip
FreeBSD-src-8fca35a71a67ff324340e8a89c496eaef25f985a.tar.gz
Bunch of small bugfixes and cleanups.
Found with: Coverity Prevent(tm) CID: 9656, 9658, 9693, 9705, 9706, 9707, 9808, 9809, 9810, 9711, 9712, 9713, 9714
Diffstat (limited to 'sys/geom/raid/md_sii.c')
-rw-r--r--sys/geom/raid/md_sii.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/geom/raid/md_sii.c b/sys/geom/raid/md_sii.c
index 305accd..568639f 100644
--- a/sys/geom/raid/md_sii.c
+++ b/sys/geom/raid/md_sii.c
@@ -1389,10 +1389,8 @@ g_raid_md_ctl_sii(struct g_raid_md_object *md,
/* If disk was assigned, just update statuses. */
if (pd->pd_disk_pos >= 0) {
g_raid_change_disk_state(disk, G_RAID_DISK_S_OFFLINE);
- if (disk->d_consumer) {
- g_raid_kill_consumer(sc, disk->d_consumer);
- disk->d_consumer = NULL;
- }
+ g_raid_kill_consumer(sc, disk->d_consumer);
+ disk->d_consumer = NULL;
TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) {
g_raid_change_subdisk_state(sd,
G_RAID_SUBDISK_S_NONE);
OpenPOWER on IntegriCloud