Skip to contentSkip to conversation

staging: wlan-ng: prism2fw.c: Fix "Possible unnecessary 'out of memory' message" checkpatch.pl warning"

PATCH New Prathamesh Deshpande 1 participant 1 message Dec 24, 2018 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: wlan-ng: prism2fw.c: Fix "Possible unnecessary 'out of memory' message" checkpatch.pl warning"

This patch removes unnecessary out of memory warning message from wlan-ng prism2fw.c file.

---
 drivers/staging/wlan-ng/prism2fw.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/wlan-ng/prism2fw.c +2 -3
index bb572b7..94800c0 100644
@@ -556,10 +556,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, exiting.\n");
+		if (!clist[i].data)
 			return 1;
-		}
+
 		pr_debug("chunk[%d]: addr=0x%06x len=%d\n",
 			 i, clist[i].addr, clist[i].len);
 	}
Signature · 1 line
1.8.3.1