On Tue, Oct 01, 2013 at 12:00:23PM -0400, Lidza Louina wrote: > @@ -306,7 +316,16 @@ int dgap_tty_register(struct board_t *brd) > > DPR_INIT(("DGAP REGISTER TTY: MAJORS: %d %d\n", brd->SerialDriver->major, > brd->PrintDriver->major)); > - You need a "return 0;" here otherwise we release everything on success when we worked so hard to allocate it. regards, dan carpenter > +err_unregister_serial: > + tty_unregister_driver(brd->SerialDriver); > +err_free_print_ttys: > + kfree(brd->PrintDriver->ttys); > +err_put_tty_print: > + put_tty_driver(brd->PrintDriver); > +err_free_serial_ttys: > + kfree(brd->SerialDriver->ttys); > +err_put_tty_serial: > + put_tty_driver(brd->SerialDriver); > return (rc); > } _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel