projects
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f162bbb
)
MLK-14930-2 dwc_ahsata: Fix memory issue in reset_sata
author
Ye Li
<ye.li@nxp.com>
Tue, 27 Mar 2018 07:45:10 +0000
(
00:45
-0700)
committer
Ye Li
<ye.li@nxp.com>
Fri, 24 May 2019 11:28:28 +0000
(
04:28
-0700)
The reset_sata should reset the sata device info and free the probe_ent
memory. Otherwise, it will cause memory leak if we init the sata again.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
148488728486137a790a89e9b869cc938c3e0c57
)
drivers/ata/dwc_ahsata.c
patch
|
blob
|
history
diff --git
a/drivers/ata/dwc_ahsata.c
b/drivers/ata/dwc_ahsata.c
index
4c5b984
..
8cac99e
100644
(file)
--- a/
drivers/ata/dwc_ahsata.c
+++ b/
drivers/ata/dwc_ahsata.c
@@
-920,6
+920,9
@@
int reset_sata(int dev)
while (readl(&host_mmio->ghc) & SATA_HOST_GHC_HR)
udelay(100);
+ free(uc_priv);
+ memset(&sata_dev_desc[dev], 0, sizeof(struct blk_desc));
+
return 0;
}