Re: [PATCH v3 1/2] staging: dgap: tty.c: adds error handing in tty driver allocations

2013-10-02 Thread Lidza Louina
On Tue, Oct 1, 2013 at 1:59 PM, Dan Carpenter wrote: > On Tue, Oct 01, 2013 at 12:32:06PM -0400, Lidza Louina wrote: >> On Tue, Oct 1, 2013 at 12:09 PM, Dan Carpenter >> wrote: >> > On Tue, Oct 01, 2013 at 12:00:23PM -0400, Lidza Louina wrote: >> >> @@ -306,7 +316,16 @@ int dgap_tty_register(str

Re: [PATCH v3 1/2] staging: dgap: tty.c: adds error handing in tty driver allocations

2013-10-01 Thread Dan Carpenter
On Tue, Oct 01, 2013 at 12:32:06PM -0400, Lidza Louina wrote: > On Tue, Oct 1, 2013 at 12:09 PM, Dan Carpenter > wrote: > > 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 T

Re: [PATCH v3 1/2] staging: dgap: tty.c: adds error handing in tty driver allocations

2013-10-01 Thread Lidza Louina
On Tue, Oct 1, 2013 at 12:09 PM, Dan Carpenter wrote: > 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->P

Re: [PATCH v3 1/2] staging: dgap: tty.c: adds error handing in tty driver allocations

2013-10-01 Thread Dan Carpenter
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 otherw

[PATCH v3 1/2] staging: dgap: tty.c: adds error handing in tty driver allocations

2013-10-01 Thread Lidza Louina
This patch adds error handling to the tty_driver allocations in dgap_tty_register. Now the code handles the possibility of an alloc_tty_driver, a tty_register_driver, and a brd->SerialDriver->ttys or brd->PrintDriver->ttys allocation failure. Signed-off-by: Lidza Louina --- drivers/staging/dgap