ret = wait_for_completion_interruptible_timeout(&ch_stat->done,
msecs_to_jiffies(100));
/* IP might not be started or valid stream might not be present */
- if (ret < 0) {
+ if (ret <= 0) {
dev_dbg(dev->dev, "channel status for channel %d timeout\n",
channel);
+ return ret ? : -ETIMEDOUT;
}
memcpy(uvalue->value.iec958.status, ch_stat->data,
dev_dbg(dev->dev, "user data for channel %d timeout\n",
channel);
mchp_spdifrx_isr_blockend_dis(dev);
- return ret;
+ return ret ? : -ETIMEDOUT;
}
spin_lock_irqsave(&user_data->lock, flags);