diff options
author | Adam Kwolek <adam.kwolek@intel.com> | 2011-06-14 12:48:58 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-06-14 12:48:58 +1000 |
commit | 7534230b07cffa1cd74153a344090c1892fcebdc (patch) | |
tree | 2f3332ff92fd50cd21122572f3a88b697396d9f7 | |
parent | 7e45b5504c66d29b77c16f59dc4f8f0de72145ba (diff) | |
download | mdadm-7534230b07cffa1cd74153a344090c1892fcebdc.tar.gz |
imsm: FIX: klocwork: passed dev pointer to is_gen_migration() can be NULL
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>
-rw-r--r-- | super-intel.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/super-intel.c b/super-intel.c index 6c74e50..5dc8ca8 100644 --- a/super-intel.c +++ b/super-intel.c @@ -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; |