Em Mon, Aug 14, 2000 at 10:43:48AM -0700, John Alvord escreveu:
> Missing an open curley brace below...
>
Thanks, updated patch below.
- Arnaldo
--- linux-2.4.0-test7-pre3/drivers/char/pc_keyb.c Thu Jul 13 01:58:42 2000
+++ linux-2.4.0-test7-pre3.acme/drivers/char/pc_keyb.c Mon Aug 14 15:40:01 2000
@@ -13,6 +13,9 @@
* Code fixes to handle mouse ACKs properly.
* C. Scott Ananian <cananian@alumni.princeton.edu> 1999-01-29.
*
+ * Check resource allocation in psaux_init
+ * Arnaldo Carvalho de Melo <acme@conectiva.com.br> 2000-08-14
+ *
*/
#include <linux/config.h>
@@ -1007,11 +1010,23 @@
static int __init psaux_init(void)
{
+ int ret;
+
if (!detect_auxiliary_port())
return -EIO;
- misc_register(&psaux_mouse);
queue = (struct aux_queue *) kmalloc(sizeof(*queue), GFP_KERNEL);
+
+ if (!queue)
+ return -ENOMEM;
+
+ ret = misc_register(&psaux_mouse);
+
+ if (ret) {
+ kfree(queue);
+ return ret;
+ }
+
memset(queue, 0, sizeof(*queue));
queue->head = queue->tail = 0;
init_waitqueue_head(&queue->proc_list);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:34 EST