Skip to content

Commit

Permalink
ata: fix port_map initialization fail
Browse files Browse the repository at this point in the history
Signed-off-by: Ken Wang <[email protected]>
  • Loading branch information
Ken-Vamrs authored and RadxaStephen committed May 13, 2024
1 parent b9c5922 commit 6b44a86
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,10 @@ static int ahci_host_init(struct ahci_uc_priv *uc_priv)
#endif

for (i = 0; i < uc_priv->n_ports; i++) {
uc_priv->port[i].port_mmio = ahci_port_base(mmio, i);
if (!(port_map & (1 << i)))
continue;
uc_priv->port[i].port_mmio = ahci_port_base(mmio, i);

port_mmio = (u8 *)uc_priv->port[i].port_mmio;

/* make sure port is not active */
Expand Down

0 comments on commit 6b44a86

Please sign in to comment.