From 7534230b07cffa1cd74153a344090c1892fcebdc Mon Sep 17 00:00:00 2001 From: Adam Kwolek Date: Tue, 14 Jun 2011 12:48:58 +1000 Subject: [PATCH] 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 Signed-off-by: NeilBrown --- super-intel.c | 3 +++ 1 file changed, 3 insertions(+) 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;