From: Ye Li Date: Sun, 3 May 2020 14:27:02 +0000 (+0800) Subject: sata: dwc_ahsata: Fix incorrect free X-Git-Tag: v2020.07-rc2~5^2~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cdff6fba32db88943be2b04639ad6e7746a2be11;p=oweals%2Fu-boot.git 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 Signed-off-by: Ye Li Signed-off-by: Peng Fan Reviewed-by: Simon Glass --- 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; }