Input: edt-ft5x06: Delete an error message for a failed memory allocation in edt_ft5x06_ts_probe()
Subsystems (3)
PATCH 1/1 Input: edt-ft5x06: Delete an error message for a failed memory allocation in edt_ft5x06_ts_probe()
From: Markus Elfring <[email protected]>
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 <[email protected]>
--- drivers/input/touchscreen/edt-ft5x06.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/input/touchscreen/edt-ft5x06.c +1 -3
@@ -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)
Signature · 1 line
2.16.0
Quoted 8 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Sun, 21 Jan 2018 20:10:03 +0100Omit 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 <[email protected]>
Quoted 21 lines
--- drivers/input/touchscreen/edt-ft5x06.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/input/touchscreen/edt-ft5x06.c +1
-3@@ -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)
Hi Markus,
Quoted 8 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Sun, 21 Jan 2018 20:10:03 +0100Omit 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 <[email protected]>
Acked-by Andi Shyti <[email protected]>
Thanks,
Andi
Quoted 22 lines
--- drivers/input/touchscreen/edt-ft5x06.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/input/touchscreen/edt-ft5x06.c +1
-3@@ -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)Signature · 1 line
2.16.0