From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-serial@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 1/3] serial: ifx6x60: Delete an error message for a failed memory allocation in ifx_spi_spi_probe()
Date: Sat, 9 Dec 2017 20:11:17 +0100 [thread overview]
Message-ID: <378523b8-0fd4-2bc0-03f8-fa57e60e95e0@users.sourceforge.net> (raw)
In-Reply-To: <992f55e5-961d-79ea-a6cd-441ceb3ad058@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 9 Dec 2017 19:20:37 +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>
---
drivers/tty/serial/ifx6x60.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c
index 473f4f81d690..832751479f41 100644
--- a/drivers/tty/serial/ifx6x60.c
+++ b/drivers/tty/serial/ifx6x60.c
@@ -1006,10 +1006,9 @@ static int ifx_spi_spi_probe(struct spi_device *spi)
/* initialize structure to hold our device variables */
ifx_dev = kzalloc(sizeof(struct ifx_spi_device), GFP_KERNEL);
- if (!ifx_dev) {
- dev_err(&spi->dev, "spi device allocation failed");
+ if (!ifx_dev)
return -ENOMEM;
- }
+
saved_ifx_dev = ifx_dev;
ifx_dev->spi_dev = spi;
clear_bit(IFX_SPI_STATE_IO_IN_PROGRESS, &ifx_dev->flags);
--
2.15.1
next prev parent reply other threads:[~2017-12-09 19:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-09 19:10 [PATCH 0/3] tty/serial/ifx6x60: Adjustments for five function implementations SF Markus Elfring
2017-12-09 19:11 ` SF Markus Elfring [this message]
2017-12-09 19:12 ` [PATCH 2/3] serial: ifx6x60: Improve a size determination in ifx_spi_spi_probe() SF Markus Elfring
2017-12-09 19:13 ` [PATCH 3/3] serial: ifx6x60: Add some spaces for better code readability 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=378523b8-0fd4-2bc0-03f8-fa57e60e95e0@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@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
Powered by JetHome