From: Nikita Kiryanov Date: Tue, 28 Oct 2014 12:59:29 +0000 (+0200) Subject: dwc_ahsata: use bitwise operator in sata_port_status X-Git-Tag: v2015.01-rc1~82 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0029d6c1deadd1d350688c56c791fc4afe44dbcf;p=oweals%2Fu-boot.git 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: Jeroen Hofstee Cc: Jeroen Hofstee Cc: Stefano Babic Signed-off-by: Nikita Kiryanov --- diff --git a/drivers/block/dwc_ahsata.c b/drivers/block/dwc_ahsata.c index 29f478bfbe..c68fd2f256 100644 --- a/drivers/block/dwc_ahsata.c +++ b/drivers/block/dwc_ahsata.c @@ -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; } /*