Skip to contentSkip to conversation

Input: turbografx - fix reference counting

PATCH Applied Namhyung Kim 2 participants 2 messages Dec 1, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: turbografx - fix reference counting

The ref-count of parport gained from parport_find_number() was not released in normal path.

---
 drivers/input/joystick/turbografx.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/input/joystick/turbografx.c +1 -0
index d53b9e9..27b6a3c 100644
@@ -245,6 +245,7 @@ static struct tgfx __init *tgfx_probe(int parport, int *n_buttons, int n_devs)
 		goto err_free_tgfx;
         }
 
+	parport_put_port(pp);
 	return tgfx;
 
  err_free_dev:
Signature · 1 line
1.7.0.4
maintainer Applied
#1 lore raw
Quoted 3 lines · Namhyung Kim

The ref-count of parport gained from parport_find_number() was not released in normal path.

Applied, thanks.

Quoted 20 lines
---
 drivers/input/joystick/turbografx.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/input/joystick/turbografx.c +1 -0
index d53b9e9..27b6a3c 100644
@@ -245,6 +245,7 @@ static struct tgfx __init *tgfx_probe(int parport, int *n_buttons, int n_devs)
 		goto err_free_tgfx;
         }
 
+	parport_put_port(pp);
 	return tgfx;
 
  err_free_dev:
Signature · 1 line
1.7.0.4
Signature · 1 line
Dmitry