From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
dri-devel@lists.freedesktop.org,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 3/3] video: omap: Delete an error message for a failed memory allocation in mipid_spi_probe()
Date: Sun, 26 Nov 2017 18:43:17 +0100 [thread overview]
Message-ID: <62f8d5bb-64cd-487f-6ef4-e3aa7a8b5fd5@users.sourceforge.net> (raw)
In-Reply-To: <1e17c727-884d-5745-2726-48dd3a53c32f@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 26 Nov 2017 18:21:25 +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/video/fbdev/omap/lcd_mipid.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/omap/lcd_mipid.c b/drivers/video/fbdev/omap/lcd_mipid.c
index e3a85432f926..e71b674b47d8 100644
--- a/drivers/video/fbdev/omap/lcd_mipid.c
+++ b/drivers/video/fbdev/omap/lcd_mipid.c
@@ -564,10 +564,8 @@ static int mipid_spi_probe(struct spi_device *spi)
int r;
md = kzalloc(sizeof(*md), GFP_KERNEL);
- if (md == NULL) {
- dev_err(&spi->dev, "out of memory\n");
+ if (!md)
return -ENOMEM;
- }
spi->mode = SPI_MODE_0;
md->spi = spi;
--
2.15.0
prev parent reply other threads:[~2017-11-26 17:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-26 17:40 [PATCH 0/3] video/fbdev/omap: Adjustments for two function implementations SF Markus Elfring
2017-11-26 17:41 ` [PATCH 1/3] video: omap: Delete an error message for a failed memory allocation in omapfb_do_probe() SF Markus Elfring
2017-11-26 17:42 ` [PATCH 2/3] video: omap: Improve a size determination " SF Markus Elfring
2018-04-26 10:22 ` Bartlomiej Zolnierkiewicz
2017-11-26 17:43 ` SF Markus Elfring [this message]
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=62f8d5bb-64cd-487f-6ef4-e3aa7a8b5fd5@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=b.zolnierkie@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tomi.valkeinen@ti.com \
/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).