From: SF Markus Elfring <elfring@users.sourceforge.net>
To: sparclinux@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Rob Herring <robh@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH] sbus: Delete an error message for a failed memory allocation in uctrl_probe()
Date: Sat, 26 Aug 2017 19:26:44 +0000 [thread overview]
Message-ID: <f53e3426-14b4-dceb-6599-1d15f3eeee84@users.sourceforge.net> (raw)
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 26 Aug 2017 21:21:33 +0200
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>
---
drivers/sbus/char/uctrl.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c
index 0a5013350acd..f3b9f7e87ffa 100644
--- a/drivers/sbus/char/uctrl.c
+++ b/drivers/sbus/char/uctrl.c
@@ -352,10 +352,8 @@ static int uctrl_probe(struct platform_device *op)
int err = -ENOMEM;
p = kzalloc(sizeof(*p), GFP_KERNEL);
- if (!p) {
- printk(KERN_ERR "uctrl: Unable to allocate device struct.\n");
+ if (!p)
goto out;
- }
p->regs = of_ioremap(&op->resource[0], 0,
resource_size(&op->resource[0]),
--
2.14.0
reply other threads:[~2017-08-26 19:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=f53e3426-14b4-dceb-6599-1d15f3eeee84@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sparclinux@vger.kernel.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