[PATCH 1/3] misc/ti-st: Delete an error message for a failed memory allocation in kim_probe()
From: SF Markus Elfring
Date: Wed Jan 10 2018 - 10:32:45 EST
From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 10 Jan 2018 16:04:52 +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@xxxxxxxxxxxxxxxxxxxxx>
---
drivers/misc/ti-st/st_kim.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c
index b77aacafc3fc..68ebdf466b17 100644
--- a/drivers/misc/ti-st/st_kim.c
+++ b/drivers/misc/ti-st/st_kim.c
@@ -736,10 +736,9 @@ static int kim_probe(struct platform_device *pdev)
}
kim_gdata = kzalloc(sizeof(struct kim_data_s), GFP_ATOMIC);
- if (!kim_gdata) {
- pr_err("no mem to allocate");
+ if (!kim_gdata)
return -ENOMEM;
- }
+
platform_set_drvdata(pdev, kim_gdata);
err = st_core_init(&kim_gdata->core_data);
--
2.15.1