Messages in this thread Patch in this message | | | Date | Mon, 14 Aug 2000 18:08:59 -0300 | From | Arnaldo Carvalho de Melo <> | Subject | Re: [PATCH] drivers/char/qpmouse.c resource allocation fixes |
| |
Em Mon, Aug 14, 2000 at 10:37:12PM +0200, Alessandro Rubini escreveu: > > > Please take a look and consider applying. > > Looks good to me. > > Note, however, that I'm not the maintainer of generic mouse devices > any more. As a matter of facts, I haven't received any mail on the > topic for the whole time I've been listed there.
ok, so, Linus, here is the patch, and it also removes Alessandro from the MAINTAINERS file, like in the 2.2 series.
- Arnaldo
--- linux-2.4.0-test7-pre3/MAINTAINERS Sun Aug 13 09:22:50 2000 +++ linux-2.4.0-test7-pre3.acme/MAINTAINERS Mon Aug 14 18:06:42 2000 @@ -727,10 +727,8 @@ S: Maintained MOUSE AND MISC DEVICES [GENERAL] -P: Alessandro Rubini -M: rubini@ipvvis.unipv.it L: linux-kernel@vger.rutgers.edu -S: Maintained +S: Unmaintained MTRR AND SIMILAR SUPPORT [i386] P: Richard Gooch --- linux-2.4.0-test7-pre3/drivers/char/qpmouse.c Thu Jul 13 01:58:42 2000 +++ linux-2.4.0-test7-pre3.acme/drivers/char/qpmouse.c Mon Aug 14 17:35:36 2000 @@ -21,6 +21,9 @@ * Rearranged SIGIO support to use code from tty_io. 9Sept95 ctm@ardi.com * * Modularised 8-Sep-95 Philip Blundell <pjb27@cam.ac.uk> + * + * Arnaldo Carvalho de Melo <acme@conectiva.com.br> - 08/14/2000 + * - check resource allocation in qpmouse_init */ #include <linux/module.h> @@ -339,14 +342,27 @@ int __init qpmouse_init(void) { + int ret; + if (!probe_qp()) return -EIO; + queue = (struct qp_queue *) kmalloc(sizeof(*queue), GFP_KERNEL); + + if (!queue) + return -ENOMEM; + + ret = misc_register(&qp_mouse); + + if (ret) { + kfree(queue); + return ret; + } + printk(KERN_INFO "82C710 type pointing device detected -- driver installed.\n"); /* printk("82C710 address = %x (should be 0x310)\n", qp_data); */ qp_present = 1; - misc_register(&qp_mouse); - queue = (struct qp_queue *) kmalloc(sizeof(*queue), GFP_KERNEL); + 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/
| |