gpu: ipu-v3: wait_for_completion_timeout does not return negative status
authorNicholas Mc Guire <der.herr@hofr.at>
Mon, 19 Jan 2015 11:38:11 +0000 (12:38 +0100)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 27 Jan 2015 14:55:49 +0000 (15:55 +0100)
This fixes up the return value handling and the return type.

Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/gpu/ipu-v3/ipu-dc.c

index 2326c752d89b2086cb51234ef9b55ccda6bec87b..508c81d9c344e67e215f300779fd0a72a926d75b 100644 (file)
@@ -267,7 +267,8 @@ static irqreturn_t dc_irq_handler(int irq, void *dev_id)
 void ipu_dc_disable_channel(struct ipu_dc *dc)
 {
        struct ipu_dc_priv *priv = dc->priv;
-       int irq, ret;
+       int irq;
+       unsigned long ret;
        u32 val;
 
        /* TODO: Handle MEM_FG_SYNC differently from MEM_BG_SYNC */
@@ -282,7 +283,7 @@ void ipu_dc_disable_channel(struct ipu_dc *dc)
        enable_irq(irq);
        ret = wait_for_completion_timeout(&priv->comp, msecs_to_jiffies(50));
        disable_irq(irq);
-       if (ret <= 0) {
+       if (ret == 0) {
                dev_warn(priv->dev, "DC stop timeout after 50 ms\n");
 
                val = readl(dc->base + DC_WR_CH_CONF);