From: Nicholas Mc Guire Date: Mon, 19 Jan 2015 11:38:11 +0000 (+0100) Subject: gpu: ipu-v3: wait_for_completion_timeout does not return negative status X-Git-Tag: v4.0-rc1~74^2~4^2~2 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=af7537d3c8d0f894f6499376a538e8138ef188ee;p=linux.git gpu: ipu-v3: wait_for_completion_timeout does not return negative status This fixes up the return value handling and the return type. Signed-off-by: Nicholas Mc Guire Signed-off-by: Philipp Zabel --- diff --git a/drivers/gpu/ipu-v3/ipu-dc.c b/drivers/gpu/ipu-v3/ipu-dc.c index 2326c752d89b..508c81d9c344 100644 --- a/drivers/gpu/ipu-v3/ipu-dc.c +++ b/drivers/gpu/ipu-v3/ipu-dc.c @@ -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);