From: Prathamesh Deshpande Date: Mon, 24 Dec 2018 16:53:46 +0000 (-0800) Subject: staging: wlan-ng: prism2fw.c: Fix "Possible unnecessary 'out of memory' message"... X-Git-Tag: v5.1-rc1~144^2~244 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=9a47dc5f7eb3ad9a7145f43e19a2bc19b1073bfc;p=linux.git 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. Signed-off-by: Prathamesh Deshpande Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c index bb572b7fdfee..94800c007162 100644 --- a/drivers/staging/wlan-ng/prism2fw.c +++ b/drivers/staging/wlan-ng/prism2fw.c @@ -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); }