Re: [PATCH v2] staging: dgnc: check if kzalloc fails in dgnc_tty_init()

2015-04-07 Thread Giedrius Statkevičius
On Tue, 7 Apr 2015, Dan Carpenter wrote: > On Tue, Apr 07, 2015 at 03:40:17PM +0300, Giedrius Statkevičius wrote: > > If one of the allocations of memory for storing a channel information struct > > fails then free all the successful allocations and return -ENOMEM that gets > > propogated to the

Re: [PATCH v2] staging: dgnc: check if kzalloc fails in dgnc_tty_init()

2015-04-07 Thread Dan Carpenter
On Tue, Apr 07, 2015 at 03:40:17PM +0300, Giedrius Statkevičius wrote: > If one of the allocations of memory for storing a channel information struct > fails then free all the successful allocations and return -ENOMEM that gets > propogated to the pci layer. Also, remove a bogus skipping in the

[PATCH v2] staging: dgnc: check if kzalloc fails in dgnc_tty_init()

2015-04-07 Thread Giedrius Statkevičius
If one of the allocations of memory for storing a channel information struct fails then free all the successful allocations and return -ENOMEM that gets propogated to the pci layer. Also, remove a bogus skipping in the next part of the initiation if a previous memory allocation failed because we

[PATCH v2] staging: dgnc: check if kzalloc fails in dgnc_tty_init()

2015-04-07 Thread Giedrius Statkevičius
If one of the allocations of memory for storing a channel information struct fails then free all the successful allocations and return -ENOMEM that gets propogated to the pci layer. Also, remove a bogus skipping in the next part of the initiation if a previous memory allocation failed because we

Re: [PATCH v2] staging: dgnc: check if kzalloc fails in dgnc_tty_init()

2015-04-07 Thread Dan Carpenter
On Tue, Apr 07, 2015 at 03:40:17PM +0300, Giedrius Statkevičius wrote: If one of the allocations of memory for storing a channel information struct fails then free all the successful allocations and return -ENOMEM that gets propogated to the pci layer. Also, remove a bogus skipping in the next

Re: [PATCH v2] staging: dgnc: check if kzalloc fails in dgnc_tty_init()

2015-04-07 Thread Giedrius Statkevičius
On Tue, 7 Apr 2015, Dan Carpenter wrote: On Tue, Apr 07, 2015 at 03:40:17PM +0300, Giedrius Statkevičius wrote: If one of the allocations of memory for storing a channel information struct fails then free all the successful allocations and return -ENOMEM that gets propogated to the pci