]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
imsm: FIX: klocwork: passed dev pointer to is_gen_migration() can be NULL
authorAdam Kwolek <adam.kwolek@intel.com>
Tue, 14 Jun 2011 02:48:58 +0000 (12:48 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 14 Jun 2011 02:48:58 +0000 (12:48 +1000)
Pointer dev2 passed in write_super_imsm():4451 can be equal to NULL.

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
super-intel.c

index 6c74e503c0d50abae30f4dba15cb94b219d199c2..5dc8ca8adb6a1b6575fdb9c5e34341fd490ffdea 100644 (file)
@@ -5312,6 +5312,9 @@ static int update_subarray_imsm(struct supertype *st, char *subarray,
 
 static int is_gen_migration(struct imsm_dev *dev)
 {
+       if (dev == NULL)
+               return 0;
+
        if (!dev->vol.migr_state)
                return 0;