From 0029d6c1deadd1d350688c56c791fc4afe44dbcf Mon Sep 17 00:00:00 2001 From: Nikita Kiryanov Date: Tue, 28 Oct 2014 14:59:29 +0200 Subject: [PATCH] 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 --- drivers/block/dwc_ahsata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } /* -- 2.39.5