Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e03f1a84 authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds
Browse files

dm-raid1.c: fix NULL dereferences



This patch fixes two NULL dereferences introduced by commit
06386bbf and spotted by the Coverity
checker.

Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ae5e1b6c
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1695,14 +1695,15 @@ static int mirror_end_io(struct dm_target *ti, struct bio *bio,
			 * information for a retry or there was no other
			 * mirror in-sync.
			 */
			DMERR_LIMIT("Mirror read failed from %s.",
				    m->dev->name);
			DMERR_LIMIT("Mirror read failed.");
			return -EIO;
		}

		m = read_record->m;

		DMERR("Mirror read failed from %s. Trying alternative device.",
		      m->dev->name);

		m = read_record->m;
		fail_mirror(m, DM_RAID1_READ_ERROR);

		/*