mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
mmc: fix sdcard nullpoint exception
port from: (CR) Symptom: host->card is null when call mmc_sd_suspend. Root Cause: the another process call mmc_remove_card,then host->card = NULL Solution: add host->card check when it used. Test result: The SD card functions normally Change-Id: Id3312d5be7403457a864e5ddc628fd4e6da0b459 Reviewed-on: https://gerrit.mot.com/2535590 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Ying Shen <shenying@motorola.com> Reviewed-by: Zonghua Liu <a17671@motorola.com> Reviewed-by: Qiong Xie <xieq2@motorola.com> Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/2808715 Reviewed-by: Zhenghai Pan <panzh2@lenovo.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com>
This commit is contained in:
parent
106bde7f45
commit
ae805cb0ad
1 changed files with 1 additions and 1 deletions
|
|
@ -1289,7 +1289,7 @@ static int mmc_sd_suspend(struct mmc_host *host)
|
|||
int err;
|
||||
|
||||
err = _mmc_sd_suspend(host);
|
||||
if (!err) {
|
||||
if (!err && host->card) {
|
||||
pm_runtime_disable(&host->card->dev);
|
||||
pm_runtime_set_suspended(&host->card->dev);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue