Skip to content

Commit

Permalink
gpu: ipu-v3: wait_for_completion_timeout does not return negative status
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicholas Mc Guire authored and Philipp Zabel committed Jan 27, 2015
1 parent 5159571 commit af7537d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/gpu/ipu-v3/ipu-dc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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);
Expand Down

0 comments on commit af7537d

Please sign in to comment.