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

Commit 5827cbea authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: core: fix one NULL pointer dereference after SD card is removed"

parents c9d21730 cb8205bd
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -359,8 +359,12 @@ static int mmc_init_request(struct request_queue *q, struct request *req,
{
	struct mmc_queue_req *mq_rq = req_to_mmc_queue_req(req);
	struct mmc_queue *mq = q->queuedata;
	struct mmc_card *card = mq->card;
	struct mmc_host *host = card->host;
	struct mmc_host *host;

	if (!mq)
		return -ENODEV;

	host = mq->card->host;

	mq_rq->sg = mmc_alloc_sg(host->max_segs, gfp);
	if (!mq_rq->sg)