From: elfring@users.sourceforge.net (SF Markus Elfring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 01/17 1/3] mfd: abx500-core: Delete an error message for a failed memory allocation in abx500_register_ops()
Date: Fri, 9 Mar 2018 17:01:35 +0100 [thread overview]
Message-ID: <4948c6d9-af42-8c95-af38-fc448a8e25a2@users.sourceforge.net> (raw)
In-Reply-To: <6c8ff539-9e9d-635b-22a8-df8100ac8156@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 8 Mar 2018 11:44:33 +0100
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>
---
v2:
Lee Jones requested a resend for this patch. The change was rebased
on source files from Linux next-20180308.
drivers/mfd/abx500-core.c | 5 ++---
1 file 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));
--
2.16.2
next prev parent reply other threads:[~2018-03-09 16:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <c5d9751e-3ae8-0b66-821a-0e7f45bb8e1c@users.sourceforge.net>
2018-03-09 16:00 ` [PATCH v2 0/3] mfd/abx500-core: Adjustments for eight function implementations SF Markus Elfring
2018-03-09 16:01 ` SF Markus Elfring [this message]
2018-03-09 16:02 ` [PATCH v2 02/17 2/3] mfd: abx500-core: Improve two size determinations in abx500_register_ops() SF Markus Elfring
2018-03-09 16:03 ` [PATCH v2 03/17 3/3] mfd: abx500-core: Adjust 14 checks for null pointers SF Markus Elfring
2018-03-24 14:25 ` [PATCH v2 0/3] mfd/abx500-core: Adjustments for eight function implementations Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4948c6d9-af42-8c95-af38-fc448a8e25a2@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).