[PATCH] radio-cadet: check request_region() return value correctly
[firefly-linux-kernel-4.4.55.git] / drivers / char / rocket.c
index f463d6baa685cb59d848a02294c1d20d468f0510..5b1d3680c8ab1e808e8a9c535bf23cbee1322bc8 100644 (file)
@@ -355,7 +355,7 @@ static void rp_do_receive(struct r_port *info,
                ToRecv = space;
 
        if (ToRecv <= 0)
-               return;
+               goto done;
 
        /*
         * if status indicates there are errored characters in the
@@ -437,6 +437,7 @@ static void rp_do_receive(struct r_port *info,
        }
        /*  Push the data up to the tty layer */
        ld->receive_buf(tty, tty->flip.char_buf, tty->flip.flag_buf, count);
+done:
        tty_ldisc_deref(ld);
 }