linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-input@vger.kernel.org, "Andi Shyti" <andi@etezian.org>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Günter Röck" <linux@roeck-us.net>,
	"Martin Kepplinger" <martink@posteo.de>,
	"Rob Herring" <robh@kernel.org>,
	"Simon Budig" <simon.budig@kernelconcepts.de>,
	"Stefan Schöfegger" <stefan.schoefegger@ginzinger.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH] Input: edt-ft5x06: Delete an error message for a failed memory allocation in edt_ft5x06_ts_probe()
Date: Sun, 21 Jan 2018 20:19:00 +0100	[thread overview]
Message-ID: <45f8a6c2-423b-5bc1-6512-c5b954c5620b@users.sourceforge.net> (raw)

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 21 Jan 2018 20:10:03 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/input/touchscreen/edt-ft5x06.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index c53a3d7239e7..9d2799c90150 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -978,10 +978,8 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client,
 	dev_dbg(&client->dev, "probing for EDT FT5x06 I2C\n");
 
 	tsdata = devm_kzalloc(&client->dev, sizeof(*tsdata), GFP_KERNEL);
-	if (!tsdata) {
-		dev_err(&client->dev, "failed to allocate driver data.\n");
+	if (!tsdata)
 		return -ENOMEM;
-	}
 
 	chip_data = of_device_get_match_data(&client->dev);
 	if (!chip_data)
-- 
2.16.0

             reply	other threads:[~2018-01-21 19:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-21 19:19 SF Markus Elfring [this message]
2018-01-22  7:00 ` [PATCH] Input: edt-ft5x06: Delete an error message for a failed memory allocation in edt_ft5x06_ts_probe() Martin Kepplinger
2018-01-22  7:43 ` Andi Shyti

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=45f8a6c2-423b-5bc1-6512-c5b954c5620b@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=andi@etezian.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=martink@posteo.de \
    --cc=robh@kernel.org \
    --cc=simon.budig@kernelconcepts.de \
    --cc=stefan.schoefegger@ginzinger.com \
    /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).