From d11cf8cc80d946dfc9a23597cd9a0bb1c487cfa7 Mon Sep 17 00:00:00 2001 From: "Edgar E. Iglesias" Date: Mon, 3 Oct 2011 10:20:13 +0200 Subject: [PATCH] etrax-dma: Remove bogus if statement Reported-by: Stefan Weil Signed-off-by: Edgar E. Iglesias --- hw/etraxfs_dma.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/etraxfs_dma.c b/hw/etraxfs_dma.c index d3082acc8f..5ca8253ae2 100644 --- a/hw/etraxfs_dma.c +++ b/hw/etraxfs_dma.c @@ -599,12 +599,10 @@ dma_winvalid (void *opaque, target_phys_addr_t addr, uint32_t value) static void dma_update_state(struct fs_dma_ctrl *ctrl, int c) { - if ((ctrl->channels[c].regs[RW_CFG] & 1) != 3) { - if (ctrl->channels[c].regs[RW_CFG] & 2) - ctrl->channels[c].state = STOPPED; - if (!(ctrl->channels[c].regs[RW_CFG] & 1)) - ctrl->channels[c].state = RST; - } + if (ctrl->channels[c].regs[RW_CFG] & 2) + ctrl->channels[c].state = STOPPED; + if (!(ctrl->channels[c].regs[RW_CFG] & 1)) + ctrl->channels[c].state = RST; } static void -- GitLab