diff options
author | Quentin Lambert <lambert.quentin@gmail.com> | 2015-02-09 10:45:32 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-02-12 02:00:52 +0100 |
commit | 59d84ca8c46a93ad62f9129458e897e7fe5075de (patch) | |
tree | 9476854453199ad93851f272ab2acf5bbee7b147 /drivers/base/power/clock_ops.c | |
parent | PM / OPP: Assert RCU lock in exported functions (diff) | |
download | linux-59d84ca8c46a93ad62f9129458e897e7fe5075de.tar.xz linux-59d84ca8c46a93ad62f9129458e897e7fe5075de.zip |
PM / OPP / clk: Remove unnecessary OOM message
This patch reduces the kernel size by removing error messages that duplicate
the normal OOM message.
A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr)
@@
identifier f,print,l;
expression e;
constant char[] c;
@@
e = \(kzalloc\|kmalloc\|devm_kzalloc\|devm_kmalloc\)(...);
if (e == NULL) {
<+...
- print(...,c,...);
... when any
(
goto l;
|
return ...;
)
...+> }
Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base/power/clock_ops.c')
-rw-r--r-- | drivers/base/power/clock_ops.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c index d626576a4f75..7fdd0172605a 100644 --- a/drivers/base/power/clock_ops.c +++ b/drivers/base/power/clock_ops.c @@ -81,10 +81,8 @@ static int __pm_clk_add(struct device *dev, const char *con_id, return -EINVAL; ce = kzalloc(sizeof(*ce), GFP_KERNEL); - if (!ce) { - dev_err(dev, "Not enough memory for clock entry.\n"); + if (!ce) return -ENOMEM; - } if (con_id) { ce->con_id = kstrdup(con_id, GFP_KERNEL); |