From: Markus Elfring Date: Thu, 8 Mar 2018 10:44:33 +0000 (+0100) Subject: mfd: abx500-core: Delete an error message for a failed memory allocation in abx500_re... X-Git-Tag: v4.18-rc1~61^2~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5e20bfa250dc6989d4939171283a17a6d25346d;p=thirdparty%2Flinux.git 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 Reviewed-by: Linus Walleij Signed-off-by: Lee Jones --- diff --git a/drivers/mfd/abx500-core.c b/drivers/mfd/abx500-core.c index 0d3846a4767cb..c8c9d41abcaa3 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));