summaryrefslogtreecommitdiff
path: root/drivers/ata
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2020-05-03 22:27:02 +0800
committerTom Rini <trini@konsulko.com>2020-05-08 18:29:05 -0400
commitcdff6fba32db88943be2b04639ad6e7746a2be11 (patch)
tree7833bc63befb39962da9d1fbf1680ac6bd38ab02 /drivers/ata
parent87e2cb530fc147676319b7c639e7ce138ddf385e (diff)
sata: dwc_ahsata: Fix incorrect free
Fix coverity issue CID 43665: Free of address-of expression (BAD_FREE) incorrect_free: free frees incorrect pointer pp. pp points the port array field of struct ahci_uc_priv, should not free it. Acked-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/dwc_ahsata.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/ata/dwc_ahsata.c b/drivers/ata/dwc_ahsata.c
index 4b37a02338..82fbb50da6 100644
--- a/drivers/ata/dwc_ahsata.c
+++ b/drivers/ata/dwc_ahsata.c
@@ -450,7 +450,6 @@ static int ahci_port_start(struct ahci_uc_priv *uc_priv, u8 port)
mem = (u32)malloc(AHCI_PORT_PRIV_DMA_SZ + 1024);
if (!mem) {
- free(pp);
printf("No mem for table!\n");
return -ENOMEM;
}