소스 검색

MMC: S3C24XX: Ensure host->mrq->data is valid

Fix a crash if host->mrq->data is NULL on ending a transfer.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Ben Dooks 17 년 전
부모
커밋
7c14450ed6
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      drivers/mmc/host/s3cmci.c

+ 2 - 1
drivers/mmc/host/s3cmci.c

@@ -353,7 +353,8 @@ static void pio_tasklet(unsigned long data)
 			    (host->pio_active == XFER_READ) ? "read" : "write",
 			    (host->pio_active == XFER_READ) ? "read" : "write",
 			    host->pio_count, host->pio_words);
 			    host->pio_count, host->pio_words);
 
 
-			host->mrq->data->error = -EINVAL;
+			if (host->mrq->data)
+				host->mrq->data->error = -EINVAL;
 		}
 		}
 
 
 		finalize_request(host);
 		finalize_request(host);