projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
936ec43
)
mmc: fix resume kpanic if no dms been allocated when init
author
lintao
<lintao@rock-chips.com>
Tue, 9 Sep 2014 06:44:19 +0000
(14:44 +0800)
committer
lintao
<lintao@rock-chips.com>
Tue, 9 Sep 2014 06:44:19 +0000
(14:44 +0800)
drivers/mmc/host/rk_sdmmc.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/host/rk_sdmmc.c
b/drivers/mmc/host/rk_sdmmc.c
index 8daacd47a31851fb771da419a4c550020c2c8e59..4db50856b0da574de99e0e50a6131bff0d935150 100755
(executable)
--- a/
drivers/mmc/host/rk_sdmmc.c
+++ b/
drivers/mmc/host/rk_sdmmc.c
@@
-691,6
+691,10
@@
static int dw_mci_edmac_init(struct dw_mci *host)
return 0;
err_exit:
+ if (NULL != host->dms) {
+ kfree(host->dms);
+ host->dms = NULL;
+ }
return -ENXIO;
}
@@
-699,8
+703,11
@@
static void dw_mci_edmac_exit(struct dw_mci *host)
{
dma_release_channel(host->dms->ch);
host->dms->ch = NULL;
- kfree(host->dms);
- host->dms = NULL;
+
+ if (NULL != host->dms) {
+ kfree(host->dms);
+ host->dms = NULL;
+ }
}
static const struct dw_mci_dma_ops dw_mci_edmac_ops = {