> > - /* 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
> 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
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
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,
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
- /* 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),
6 matches
Mail list logo