Skip to content
Snippets Groups Projects
Commit 0029d6c1 authored by Nikita Kiryanov's avatar Nikita Kiryanov Committed by Tom Rini
Browse files

dwc_ahsata: use bitwise operator in sata_port_status


The logic of the return statement in sata_port_status() calls for a
bitwise 'AND' operator, not logical 'AND'. Fix the typo.

Reported-by: default avatarJeroen Hofstee <jeroen@myspectrum.nl>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: default avatarNikita Kiryanov <nikita@compulab.co.il>
parent 93575c30
No related branches found
No related tags found
No related merge requests found
......@@ -878,7 +878,7 @@ int sata_port_status(int dev, int port)
probe_ent = (struct ahci_probe_ent *)sata_dev_desc[dev].priv;
port_mmio = (struct sata_port_regs *)probe_ent->port[port].port_mmio;
return readl(&(port_mmio->ssts)) && SATA_PORT_SSTS_DET_MASK;
return readl(&(port_mmio->ssts)) & SATA_PORT_SSTS_DET_MASK;
}
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment