staging: wlan-ng: prism2fw.c: Fix "Possible unnecessary 'out of memory' message"...
authorPrathamesh Deshpande <prathameshdeshpande7@gmail.com>
Mon, 24 Dec 2018 16:53:46 +0000 (08:53 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Jan 2019 07:56:07 +0000 (08:56 +0100)
This patch removes unnecessary out of memory warning
message from wlan-ng prism2fw.c file.

Signed-off-by: Prathamesh Deshpande <prathameshdeshpande7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlan-ng/prism2fw.c

index bb572b7..94800c0 100644 (file)
@@ -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);
        }