For POLLOUT poll only checked if the adapter was configured, not
if there was room in the transmit queue. Add that check.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
        if (!devnode->registered)
                return POLLERR | POLLHUP;
        mutex_lock(&adap->lock);
-       if (adap->is_configured)
+       if (adap->is_configured &&
+           adap->transmit_queue_sz < CEC_MAX_MSG_TX_QUEUE_SZ)
                res |= POLLOUT | POLLWRNORM;
        if (fh->queued_msgs)
                res |= POLLIN | POLLRDNORM;