From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-input@vger.kernel.org,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Ferruh Yigit <fery@cypress.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 1/3] Input: cyttsp4_core: Delete two error messages for a failed memory allocation in cyttsp4_probe()
Date: Sun, 21 Jan 2018 21:27:28 +0100 [thread overview]
Message-ID: <2ca4b5f1-2b2f-19f4-d0ce-95586bb9d5cd@users.sourceforge.net> (raw)
In-Reply-To: <61183426-0b2a-4b93-933c-a2dfd487d92b@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 21 Jan 2018 20:57:40 +0100
Omit extra messages 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/cyttsp4_core.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/input/touchscreen/cyttsp4_core.c b/drivers/input/touchscreen/cyttsp4_core.c
index 727c3232517c..f0bf3cc20e9d 100644
--- a/drivers/input/touchscreen/cyttsp4_core.c
+++ b/drivers/input/touchscreen/cyttsp4_core.c
@@ -2037,14 +2037,12 @@ struct cyttsp4 *cyttsp4_probe(const struct cyttsp4_bus_ops *ops,
cd = kzalloc(sizeof(*cd), GFP_KERNEL);
if (!cd) {
- dev_err(dev, "%s: Error, kzalloc\n", __func__);
rc = -ENOMEM;
goto error_alloc_data;
}
cd->xfer_buf = kzalloc(xfer_buf_size, GFP_KERNEL);
if (!cd->xfer_buf) {
- dev_err(dev, "%s: Error, kzalloc\n", __func__);
rc = -ENOMEM;
goto error_free_cd;
}
--
2.16.0
next prev parent reply other threads:[~2018-01-21 20:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-21 20:26 [PATCH 0/3] Input-cyttsp4_core: Adjustments for some function implementations SF Markus Elfring
2018-01-21 20:27 ` SF Markus Elfring [this message]
2018-01-21 20:29 ` [PATCH 2/3] Input: cyttsp4_core: Delete an unnecessary return statement in three functions SF Markus Elfring
2018-01-21 20:30 ` [PATCH 3/3] Input: cyttsp4_core: Adjust 13 checks for null pointers SF Markus Elfring
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=2ca4b5f1-2b2f-19f4-d0ce-95586bb9d5cd@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=dmitry.torokhov@gmail.com \
--cc=fery@cypress.com \
--cc=kernel-janitors@vger.kernel.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