]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
greybus: uart: Fix minor number leak
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Fri, 10 Jun 2016 16:33:03 +0000 (17:33 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 10 Jun 2016 23:26:31 +0000 (16:26 -0700)
On the gb_uart_remove() path we are forgetting to do a release_minor()
leading to a minor number leak. This is a simple one-line fix.

Tested on EVT 2.0

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/uart.c

index d1611abf8ccd92c449ebe572c3f1c3e7d7fc9b45..7460bdbd0a1a5e2484e51ce2068ae2289148a074 100644 (file)
@@ -969,6 +969,7 @@ static void gb_uart_remove(struct gbphy_device *gbphy_dev)
        gb_connection_disable(connection);
        tty_port_destroy(&gb_tty->port);
        gb_connection_destroy(connection);
+       release_minor(gb_tty);
        kfifo_free(&gb_tty->write_fifo);
        kfree(gb_tty->buffer);
        kfree(gb_tty);