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

Commit 5e3a69fd authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: core: resolve divded by zero panic"

parents 325db4fb 4ed3f695
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2317,7 +2317,7 @@ void mmc_init_erase(struct mmc_card *card)
		card->erase_shift = ffs(card->ssr.au) - 1;
	} else if (card->ext_csd.hc_erase_size) {
		card->pref_erase = card->ext_csd.hc_erase_size;
	} else {
	} else if (card->erase_size) {
		sz = (card->csd.capacity << (card->csd.read_blkbits - 9)) >> 11;
		if (sz < 128)
			card->pref_erase = 512 * 1024 / 512;
@@ -2334,7 +2334,8 @@ void mmc_init_erase(struct mmc_card *card)
			if (sz)
				card->pref_erase += card->erase_size - sz;
		}
	}
	} else
		card->pref_erase = 0;
}

static unsigned int mmc_mmc_erase_timeout(struct mmc_card *card,