From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/8] input: Remove OOM message after input_allocate_device
Date: Thu, 24 Oct 2013 20:26:11 +0200 [thread overview]
Message-ID: <20131024182611.GA3512@pengutronix.de> (raw)
In-Reply-To: <cc5e6a317bc9ef33cfdfae3ed9d3a47b5319a47b.1382555436.git.joe@perches.com>
Hello Joe,
On Wed, Oct 23, 2013 at 12:14:50PM -0700, Joe Perches wrote:
> 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>
> diff --git a/drivers/input/joystick/as5011.c b/drivers/input/joystick/as5011.c
> index 005d852..3b9c709 100644
> --- a/drivers/input/joystick/as5011.c
> +++ b/drivers/input/joystick/as5011.c
> @@ -254,8 +254,6 @@ static int as5011_probe(struct i2c_client *client,
> as5011 = kmalloc(sizeof(struct as5011_device), GFP_KERNEL);
> input_dev = input_allocate_device();
> if (!as5011 || !input_dev) {
> - dev_err(&client->dev,
> - "Can't allocate memory for device structure\n");
Don't know if that can happen, but if as5011 is NULL but input_dev isn't
the message would still be sensible, wouldn't it? There are several more
that suffer the same "problem".
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2013-10-24 18:26 UTC|newest]
Thread overview: 11+ 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 ` [PATCH 4/8] input: Remove OOM message after input_allocate_device Joe Perches
2013-10-24 18:26 ` Uwe Kleine-König [this message]
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=20131024182611.GA3512@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.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).