[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8c1727a5-425f-da88-7ae5-6fb97f8e03d8@users.sourceforge.net>
Date: Wed, 13 Dec 2017 14:11:29 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: devel@...verdev.osuosl.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Maciek Borzecki <maciek.borzecki@...il.com>,
Simo Koskinen <koskisoft@...il.com>,
Thibaut Sautereau <thibaut.sautereau@...ecom-sudparis.eu>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 1/4] staging/wlan-ng/prism2fw: Delete an error message for a
failed memory allocation in mkimage()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Wed, 13 Dec 2017 12:57:13 +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@...rs.sourceforge.net>
---
drivers/staging/wlan-ng/prism2fw.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c
index 344bec8cc31b..6888d1b093fa 100644
--- a/drivers/staging/wlan-ng/prism2fw.c
+++ b/drivers/staging/wlan-ng/prism2fw.c
@@ -557,10 +557,9 @@ static int mkimage(struct imgchunk *clist, unsigned int *ccnt)
/* Allocate buffer space for chunks */
for (i = 0; i < *ccnt; i++) {
clist[i].data = kzalloc(clist[i].len, GFP_KERNEL);
- if (!clist[i].data) {
- pr_err("failed to allocate image space, exitting.\n");
+ if (!clist[i].data)
return 1;
- }
+
pr_debug("chunk[%d]: addr=0x%06x len=%d\n",
i, clist[i].addr, clist[i].len);
}
--
2.15.1
Powered by blists - more mailing lists