Re: lirc: igorplususb error handling cleanup

2007-02-02 Thread Oliver Neukum
> > - /* allocate kernel memory */ > > - mem_failure = 0; > > - if (!(ir = kmalloc(sizeof(struct irctl), GFP_KERNEL))) { > > - mem_failure = 1; > > - } else { > > - memset(ir, 0, sizeof(struct irctl)); > > - > > - if (!(plugin = kmalloc(sizeof(struct

Re: lirc: igorplususb error handling cleanup

2007-02-02 Thread Oleg Verych
> From: Pekka J Enberg > Newsgroups: gmane.linux.kernel > Subject: lirc: igorplususb error handling cleanup > Date: Fri, 2 Feb 2007 11:15:15 +0200 (EET) > Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/488937> Hallo. > Use goto instead of a big ugly s

lirc: igorplususb error handling cleanup

2007-02-02 Thread Pekka J Enberg
From: Pekka Enberg <[EMAIL PROTECTED]> Use goto instead of a big ugly switch for error handling. Convert some kmalloc + memset pairs to kzalloc too. Signed-off-by: Pekka Enberg <[EMAIL PROTECTED]> --- drivers/lirc_igorplugusb/lirc_igorplugusb.c | 116 +--- 1 file

lirc: igorplususb error handling cleanup

2007-02-02 Thread Pekka J Enberg
From: Pekka Enberg [EMAIL PROTECTED] Use goto instead of a big ugly switch for error handling. Convert some kmalloc + memset pairs to kzalloc too. Signed-off-by: Pekka Enberg [EMAIL PROTECTED] --- drivers/lirc_igorplugusb/lirc_igorplugusb.c | 116 +--- 1 file changed,

Re: lirc: igorplususb error handling cleanup

2007-02-02 Thread Oleg Verych
From: Pekka J Enberg Newsgroups: gmane.linux.kernel Subject: lirc: igorplususb error handling cleanup Date: Fri, 2 Feb 2007 11:15:15 +0200 (EET) Archived-At: http://permalink.gmane.org/gmane.linux.kernel/488937 Hallo. Use goto instead of a big ugly switch for error handling. Convert some

Re: lirc: igorplususb error handling cleanup

2007-02-02 Thread Oliver Neukum
- /* allocate kernel memory */ - mem_failure = 0; - if (!(ir = kmalloc(sizeof(struct irctl), GFP_KERNEL))) { - mem_failure = 1; - } else { - memset(ir, 0, sizeof(struct irctl)); - - if (!(plugin = kmalloc(sizeof(struct lirc_plugin),