Commit c76e4d2e authored by Markus Elfring's avatar Markus Elfring Committed by Tony Lindgren

ARM: OMAP2+: SmartReflex: Delete an error message for a failed memory allocation in two functions

Omit an extra message for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdfSigned-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 6b72de4d
...@@ -45,10 +45,8 @@ static void __init sr_set_nvalues(struct omap_volt_data *volt_data, ...@@ -45,10 +45,8 @@ static void __init sr_set_nvalues(struct omap_volt_data *volt_data,
count++; count++;
nvalue_table = kcalloc(count, sizeof(*nvalue_table), GFP_KERNEL); nvalue_table = kcalloc(count, sizeof(*nvalue_table), GFP_KERNEL);
if (!nvalue_table) { if (!nvalue_table)
pr_err("OMAP: SmartReflex: cannot allocate memory for n-value table\n");
return; return;
}
for (i = 0, j = 0; i < count; i++) { for (i = 0, j = 0; i < count; i++) {
u32 v; u32 v;
...@@ -101,11 +99,8 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user) ...@@ -101,11 +99,8 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user)
static int i; static int i;
sr_data = kzalloc(sizeof(*sr_data), GFP_KERNEL); sr_data = kzalloc(sizeof(*sr_data), GFP_KERNEL);
if (!sr_data) { if (!sr_data)
pr_err("%s: Unable to allocate memory for %s sr_data\n",
__func__, oh->name);
return -ENOMEM; return -ENOMEM;
}
sr_dev_attr = (struct omap_smartreflex_dev_attr *)oh->dev_attr; sr_dev_attr = (struct omap_smartreflex_dev_attr *)oh->dev_attr;
if (!sr_dev_attr || !sr_dev_attr->sensor_voltdm_name) { if (!sr_dev_attr || !sr_dev_attr->sensor_voltdm_name) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment