[PATCH 2/2] imsm: FIX: klocwork: passed dev pointer to is_gen_migration() can be NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pointer dev2 passed in write_super_imsm():4451 can be equal to NULL.

Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx>
---

 super-intel.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/super-intel.c b/super-intel.c
index 8dd0805..3b4010d 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -5321,6 +5321,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;
 

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux