summaryrefslogtreecommitdiff
path: root/drivers/mfd/abx500-core.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2018-03-08 11:44:33 +0100
committerLee Jones <lee.jones@linaro.org>2018-05-16 09:21:48 +0100
commita5e20bfa250dc6989d4939171283a17a6d25346d (patch)
tree83b4e3f312f1f0ea5ea6ec1b9e0c26fef7e8306c /drivers/mfd/abx500-core.c
parent5112cab38c76c28f973def1a9c8b881f2dc81a48 (diff)
mfd: abx500-core: Delete an error message for a failed memory allocation in abx500_register_ops()
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@users.sourceforge.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/abx500-core.c')
-rw-r--r--drivers/mfd/abx500-core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mfd/abx500-core.c b/drivers/mfd/abx500-core.c
index 0d3846a4767c..c8c9d41abcaa 100644
--- a/drivers/mfd/abx500-core.c
+++ b/drivers/mfd/abx500-core.c
@@ -40,10 +40,9 @@ int abx500_register_ops(struct device *dev, struct abx500_ops *ops)
dev_entry = devm_kzalloc(dev,
sizeof(struct abx500_device_entry),
GFP_KERNEL);
- if (!dev_entry) {
- dev_err(dev, "register_ops kzalloc failed");
+ if (!dev_entry)
return -ENOMEM;
- }
+
dev_entry->dev = dev;
memcpy(&dev_entry->ops, ops, sizeof(struct abx500_ops));