summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-06-03 20:16:27 +0300
committerTony Lindgren <tony@atomide.com>2017-06-08 13:02:32 +0300
commitc76e4d2e50068ddd82fe18f86d05a33733877059 (patch)
tree51064853568a7e3d20339302284e1bcf7120b132 /arch/arm/mach-omap2
parent6b72de4d331f058dbd8fa327f1e5d0a729583f56 (diff)
downloadlinux-c76e4d2e50068ddd82fe18f86d05a33733877059.tar.xz
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.pdf Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/sr_device.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/sr_device.c b/arch/arm/mach-omap2/sr_device.c
index 65775c6e8c27..eef6935e0403 100644
--- a/arch/arm/mach-omap2/sr_device.c
+++ b/arch/arm/mach-omap2/sr_device.c
@@ -45,10 +45,8 @@ static void __init sr_set_nvalues(struct omap_volt_data *volt_data,
count++;
nvalue_table = kcalloc(count, sizeof(*nvalue_table), GFP_KERNEL);
- if (!nvalue_table) {
- pr_err("OMAP: SmartReflex: cannot allocate memory for n-value table\n");
+ if (!nvalue_table)
return;
- }
for (i = 0, j = 0; i < count; i++) {
u32 v;
@@ -101,11 +99,8 @@ static int __init sr_dev_init(struct omap_hwmod *oh, void *user)
static int i;
sr_data = kzalloc(sizeof(*sr_data), GFP_KERNEL);
- if (!sr_data) {
- pr_err("%s: Unable to allocate memory for %s sr_data\n",
- __func__, oh->name);
+ if (!sr_data)
return -ENOMEM;
- }
sr_dev_attr = (struct omap_smartreflex_dev_attr *)oh->dev_attr;
if (!sr_dev_attr || !sr_dev_attr->sensor_voltdm_name) {