ata: ahci: remove bad free
authorVincent Stehlé <vincent.stehle@arm.com>
Mon, 24 Mar 2025 08:34:06 +0000 (09:34 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 8 Apr 2025 22:23:27 +0000 (16:23 -0600)
commita345f44a60f57a2741cda9315312d3df28bc22f0
tree1d182e782bebf50b13adf8ad12636f41ad0d2088
parent65504478fe44f6dd8b61907efa4eaeba5b79cbf5
ata: ahci: remove bad free

In the case of a memory allocation error, the ahci_port_start() function
tries to free the `pp' pointer.
This pointer was not dynamically allocated but does in fact point to an
element of the port[] array member of the struct ahci_uc_priv.
Remove the erroneous call to free() to fix this.

Fixes: 4782ac80b02f ("Add AHCI support to u-boot")
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Jason Jin <jason.jin@freescale.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
drivers/ata/ahci.c