* [PATCH] tty: isicom: Delete an error message for a failed memory allocation in load_firmware()
@ 2017-12-10 16:07 SF Markus Elfring
0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2017-12-10 16:07 UTC (permalink / raw)
To: kernel-janitors, Greg Kroah-Hartman, Jiri Slaby; +Cc: LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 10 Dec 2017 17:00:05 +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/isicom.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/isicom.c b/drivers/tty/isicom.c
index ee7958ab269f..c087ebfe62fd 100644
--- a/drivers/tty/isicom.c
+++ b/drivers/tty/isicom.c
@@ -1482,11 +1482,9 @@ static int load_firmware(struct pci_dev *pdev,
}
data = kmalloc(word_count * 2, GFP_KERNEL);
- if (data == NULL) {
- dev_err(&pdev->dev, "Card%d, firmware upload "
- "failed, not enough memory\n", index + 1);
+ if (!data)
goto errrelfw;
- }
+
inw(base);
insw(base, data, word_count);
InterruptTheCard(base);
--
2.15.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-12-10 16:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-10 16:07 [PATCH] tty: isicom: Delete an error message for a failed memory allocation in load_firmware() SF Markus Elfring
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).