From: SF Markus Elfring <elfring@users.sourceforge.net>
To: "David S. Miller" <davem@davemloft.net>,
Jarod Wilson <jarod@redhat.com>,
Johannes Berg <johannes.berg@intel.com>,
Stephen Hemminger <stephen@networkplumber.org>,
kernel-janitors@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/3] char/pcmcia: Delete an error message for a failed memory allocation in mgslpc_probe()
Date: Mon, 16 Oct 2017 14:18:07 +0200 [thread overview]
Message-ID: <378e6889-d956-af80-7885-4bc8c6500d1f@users.sourceforge.net> (raw)
In-Reply-To: <5e693086-a995-81ad-4a3f-cf8ab2bac454@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 16 Oct 2017 11:46:38 +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/char/pcmcia/synclink_cs.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index 62be953e5fb0..4db7eda2e7f2 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -520,10 +520,8 @@ static int mgslpc_probe(struct pcmcia_device *link)
printk("mgslpc_attach\n");
info = kzalloc(sizeof(MGSLPC_INFO), GFP_KERNEL);
- if (!info) {
- printk("Error can't allocate device instance data\n");
+ if (!info)
return -ENOMEM;
- }
info->magic = MGSLPC_MAGIC;
tty_port_init(&info->port);
--
2.14.2
next prev parent reply other threads:[~2017-10-16 12:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-16 12:17 [PATCH 0/3] char-pcmcia: Adjustments for ten function implementations SF Markus Elfring
2017-10-16 12:18 ` SF Markus Elfring [this message]
2017-10-16 12:19 ` [PATCH 2/3] char/pcmcia: Improve nine size determinations SF Markus Elfring
2017-10-16 12:20 ` [PATCH 3/3] char/pcmcia: Adjust a null pointer check in three functions SF Markus Elfring
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=378e6889-d956-af80-7885-4bc8c6500d1f@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=davem@davemloft.net \
--cc=jarod@redhat.com \
--cc=johannes.berg@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stephen@networkplumber.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