mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 06:00:43 +00:00
sata: dwc_ahsata: Fix memory issue in reset_sata
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> Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
cdff6fba32
commit
6b6c620c82
1 changed files with 3 additions and 0 deletions
|
@ -918,6 +918,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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue