summaryrefslogtreecommitdiff
path: root/drivers/i3c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-11-16 18:42:23 +0000
committerBoris Brezillon <boris.brezillon@bootlin.com>2018-12-05 17:22:58 +0100
commit2b2b283c059617e1be6b49872fd004b59c66594a (patch)
tree1c1532dcde1b8e058502245a409282f8c643f4ae /drivers/i3c
parent16da99cf0e4d7ccaebe6c095ee31abfeb4025ee5 (diff)
i3c: master: dw: fix mask operation by using the correct operator
The masking operation on status is using a bitwise 'or' rather than a bitwise 'and' operator, and hence the result is always non-zero which is probably not what is intended. Fix this by using the correct operator. Detected by CoverityScan, CID#1475523 ("Wrong operator used") Fixes: 88acc98a712a ("i3c: master: Add driver for Synopsys DesignWare IP") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Vitor Soares <vitor.soares@synopsys.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Diffstat (limited to 'drivers/i3c')
-rw-r--r--drivers/i3c/master/dw-i3c-master.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
index 0153e6e9de52..b532e2c9cf5c 100644
--- a/drivers/i3c/master/dw-i3c-master.c
+++ b/drivers/i3c/master/dw-i3c-master.c
@@ -1085,7 +1085,7 @@ static irqreturn_t dw_i3c_master_irq_handler(int irq, void *dev_id)
spin_lock(&master->xferqueue.lock);
dw_i3c_master_end_xfer_locked(master, status);
- if (status | INTR_TRANSFER_ERR_STAT)
+ if (status & INTR_TRANSFER_ERR_STAT)
writel(INTR_TRANSFER_ERR_STAT, master->regs + INTR_STATUS);
spin_unlock(&master->xferqueue.lock);