Commit 9e1d2397bbf6bc4b6a723e9e362ac92a235a44be

Authored by Ye Li
1 parent e1076ddb3e

MLK-20356-2 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.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit da3f3a081690d4d7fc901d922d01e2bbe6cb4eb5)

Showing 1 changed file with 0 additions and 1 deletions Side-by-side Diff

drivers/ata/dwc_ahsata.c
... ... @@ -448,7 +448,6 @@
448 448  
449 449 mem = (u32)malloc(AHCI_PORT_PRIV_DMA_SZ + 1024);
450 450 if (!mem) {
451   - free(pp);
452 451 printf("No mem for table!\n");
453 452 return -ENOMEM;
454 453 }