aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/char/lp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index 0e081f521f51..cef2ea386f5e 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -993,6 +993,7 @@ static void lp_detach(struct parport *port)
for (n = 0; n < LP_NO; n++) {
if (port_num[n] == port->number) {
port_num[n] = -1;
+ lp_count--;
device_destroy(lp_class, MKDEV(LP_MAJOR, n));
parport_unregister_device(lp_table[n].dev);
}