linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: linux-kernel@vger.kernel.org
Cc: "Bruno Prémont" <bonbons@linux-vserver.org>, linux-input@vger.kernel.org
Subject: [PATCH 3/8] hid: Remove OOM message after input_allocate_device
Date: Wed, 23 Oct 2013 12:14:49 -0700	[thread overview]
Message-ID: <890e072c3487378bf1203acf65cc0e204dea89bb.1382555436.git.joe@perches.com> (raw)
In-Reply-To: <cover.1382555436.git.joe@perches.com>

Emitting an OOM message isn't necessary after input_allocate_device
as there's a generic OOM and a dump_stack already done.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/hid/hid-input.c        | 1 -
 drivers/hid/hid-picolcd_core.c | 5 ++---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 8741d95..aed8238 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -1263,7 +1263,6 @@ static struct hid_input *hidinput_allocate(struct hid_device *hid)
 	if (!hidinput || !input_dev) {
 		kfree(hidinput);
 		input_free_device(input_dev);
-		hid_err(hid, "Out of memory during hid input probe\n");
 		return NULL;
 	}
 
diff --git a/drivers/hid/hid-picolcd_core.c b/drivers/hid/hid-picolcd_core.c
index acbb0210..f34ba0f 100644
--- a/drivers/hid/hid-picolcd_core.c
+++ b/drivers/hid/hid-picolcd_core.c
@@ -431,10 +431,9 @@ static int picolcd_init_keys(struct picolcd_data *data,
 	}
 
 	idev = input_allocate_device();
-	if (idev == NULL) {
-		hid_err(hdev, "failed to allocate input device\n");
+	if (idev == NULL)
 		return -ENOMEM;
-	}
+
 	input_set_drvdata(idev, hdev);
 	memcpy(data->keycode, def_keymap, sizeof(def_keymap));
 	idev->name = hdev->name;
-- 
1.8.1.2.459.gbcd45b4.dirty

  reply	other threads:[~2013-10-23 19:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-23 19:14 [PATCH 0/8] treewide: Remove OOM message after input_alloc_device Joe Perches
2013-10-23 19:14 ` Joe Perches [this message]
2013-10-23 19:14 ` [PATCH 4/8] input: Remove OOM message after input_allocate_device Joe Perches
2013-10-24 18:26   ` Uwe Kleine-König
2013-10-24 18:43     ` Joe Perches
2013-10-24 18:46       ` Uwe Kleine-König
2013-10-24 18:48         ` Joe Perches
2013-10-24 19:15           ` Uwe Kleine-König
2013-10-24 18:37   ` Dmitry Torokhov
2013-10-24 18:45     ` Joe Perches
2013-10-24 19:10       ` Dmitry Torokhov
2013-10-24 19:20         ` Joe Perches

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=890e072c3487378bf1203acf65cc0e204dea89bb.1382555436.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=bonbons@linux-vserver.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).