* [PATCH] qtronix missing failure handling
@ 2005-03-05 15:08 Panagiotis Issaris
2005-03-10 17:28 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: Panagiotis Issaris @ 2005-03-05 15:08 UTC (permalink / raw)
To: linux-kernel
Hi,
The Qtronix keyboard driver doesn't handle the possible failure of memory
allocation.
Signed-off-by: Panagiotis Issaris <panagiotis.issaris@mech.kuleuven.ac.be>
diff -pruN linux-2.6.11-mm1/drivers/char/qtronix.c linux-2.6.11-mm1-pi/drivers/char/qtronix.c
--- linux-2.6.11-mm1/drivers/char/qtronix.c 2005-03-05 15:56:43.000000000 +0100
+++ linux-2.6.11-mm1-pi/drivers/char/qtronix.c 2005-03-05 15:57:22.000000000 +0100
@@ -591,6 +591,11 @@ static int __init psaux_init(void)
return retval;
queue = (struct aux_queue *) kmalloc(sizeof(*queue), GFP_KERNEL);
+ if (!queue) {
+ misc_deregister(&psaux_mouse);
+ return -ENOMEM;
+ }
+
memset(queue, 0, sizeof(*queue));
queue->head = queue->tail = 0;
init_waitqueue_head(&queue->proc_list);
--
K.U.Leuven, Mechanical Eng., Mechatronics & Robotics Research Group
http://people.mech.kuleuven.ac.be/~pissaris/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] qtronix missing failure handling
2005-03-05 15:08 [PATCH] qtronix missing failure handling Panagiotis Issaris
@ 2005-03-10 17:28 ` Ralf Baechle
0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2005-03-10 17:28 UTC (permalink / raw)
To: Panagiotis Issaris; +Cc: linux-kernel, linux-mips
On Sat, Mar 05, 2005 at 04:08:44PM +0100, Panagiotis Issaris wrote:
> Hi,
>
> The Qtronix keyboard driver doesn't handle the possible failure of memory
> allocation.
Thanks, applied.
Please copy Linux/MIPS-specific patches to me or linux-mips@linux-mips.org;
it was more a coincidence that I noticed your patch on this list.
Thanks,
Ralf
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-03-10 17:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-05 15:08 [PATCH] qtronix missing failure handling Panagiotis Issaris
2005-03-10 17:28 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox