lkml.org 
[lkml]   [2018]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 1/3] Input: cyttsp4_core: Delete two error messages for a failed memory allocation in cyttsp4_probe()
From
Date
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
\
 
 \ /
  Last update: 2018-01-21 21:28    [W:0.046 / U:1.188 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site