dwc_ahsata: use bitwise operator in sata_port_status
authorNikita Kiryanov <nikita@compulab.co.il>
Tue, 28 Oct 2014 12:59:29 +0000 (14:59 +0200)
committerTom Rini <trini@ti.com>
Tue, 28 Oct 2014 16:39:59 +0000 (12:39 -0400)
The logic of the return statement in sata_port_status() calls for a
bitwise 'AND' operator, not logical 'AND'. Fix the typo.

Reported-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
drivers/block/dwc_ahsata.c

index 29f478bfbe0d35b93953bb35217970fc328d81a4..c68fd2f256541403a97f840599353dbadf7ec6df 100644 (file)
@@ -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;
 }
 
 /*