mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: vojtech@ucw.cz, kernel list <linux-kernel@vger.kernel.org>,
	Rusty trivial patch monkey Russell  <trivial@rustcorp.com.au>
Subject: cleanups for input
Date: Sun, 16 Nov 2003 14:09:09 +0100	[thread overview]
Message-ID: <20031116130909.GA275@elf.ucw.cz> (raw)

Hi!

I know cleanups are not wanted just now, but I'd like this queued...

GFP_ATOMIC can fail at any time; I believe we do not want "heisenbugs"
so we should at least warn.

[serio_rescan() does not return error value yet it can fail. It seems
pretty broken to me :-(.]

--- tmp/linux/drivers/input/serio/serio.c	2003-09-28 22:05:48.000000000 +0200
+++ linux/drivers/input/serio/serio.c	2003-11-15 20:41:24.000000000 +0100
@@ -134,8 +134,10 @@
 {
 	struct serio_event *event;
 
-	if (!(event = kmalloc(sizeof(struct serio_event), GFP_ATOMIC)))
+	if (!(event = kmalloc(sizeof(struct serio_event), GFP_ATOMIC))) {
+		printk(KERN_CRIT "Could not rescan serio: out of memory\n");
 		return;
+	}
 
 	event->type = SERIO_RESCAN;
 	event->serio = serio;
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

                 reply	other threads:[~2003-11-16 13:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031116130909.GA275@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@rustcorp.com.au \
    --cc=vojtech@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®