Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248655
b: refs/heads/master
c: a9dccdd
h: refs/heads/master
i:
  248653: 4d1567c
  248651: 22951a7
  248647: 79f33cc
  248639: 97c2811
v: v3
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Apr 19, 2011
1 parent 1b54817 commit f19f3f5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6716671d8c1c07a8072098764d1b7cbfef7412ad
refs/heads/master: a9dccddb60913056bcadaeeacfe0395447fd2472
6 changes: 4 additions & 2 deletions trunk/drivers/tty/pty.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static int pty_install(struct tty_driver *driver, struct tty_struct *tty)
the easy way .. */
retval = tty_init_termios(tty);
if (retval)
goto err_module_put;
goto err_deinit_tty;

retval = tty_init_termios(o_tty);
if (retval)
Expand All @@ -327,7 +327,8 @@ static int pty_install(struct tty_driver *driver, struct tty_struct *tty)
return 0;
err_free_termios:
tty_free_termios(tty);
err_module_put:
err_deinit_tty:
deinitialize_tty_struct(o_tty);
module_put(o_tty->driver->owner);
err_free_tty:
free_tty_struct(o_tty);
Expand Down Expand Up @@ -592,6 +593,7 @@ static int pty_unix98_install(struct tty_driver *driver, struct tty_struct *tty)
pty_count++;
return 0;
err_free_mem:
deinitialize_tty_struct(o_tty);
kfree(o_tty->termios);
kfree(tty->termios);
module_put(o_tty->driver->owner);
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/tty/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx,

retval = tty_driver_install_tty(driver, tty);
if (retval < 0)
goto err_free_tty;
goto err_deinit_tty;

/*
* Structures all installed ... call the ldisc open routines.
Expand All @@ -1411,7 +1411,8 @@ struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx,
goto err_release_tty;
return tty;

err_free_tty:
err_deinit_tty:
deinitialize_tty_struct(tty);
free_tty_struct(tty);
err_module_put:
module_put(driver->owner);
Expand Down

0 comments on commit f19f3f5

Please sign in to comment.