uterm_input: fix increasing refcnt

We need to correctly increase the refcnt. We currently increase it only
when it was 0 before due to a very subtle bug as we missed the "return".

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-05-27 12:04:48 +02:00
parent 6c8877e0a2
commit 415417c97c

View File

@ -275,6 +275,7 @@ err_free:
void uterm_input_ref(struct uterm_input *input)
{
if (!input || !input->ref)
return;
++input->ref;
}