OSDN Git Service

Staging: wlan-ng: Handle error condition.
authorSandhya Bankar <bankarsandhya512@gmail.com>
Mon, 7 Mar 2016 10:45:59 +0000 (16:15 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
Handle error condition.

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

index 8d6ab72..8564d9e 100644 (file)
@@ -333,6 +333,10 @@ static int prism2_fwapply(const struct ihex_binrec *rfptr,
 
        /* Make the image chunks */
        result = mkimage(fchunk, &nfchunks);
+       if (result) {
+               netdev_err(wlandev->netdev, "Failed to make image chunk.\n");
+               return 1;
+       }
 
        /* Do any plugging */
        result = plugimage(fchunk, nfchunks, s3plug, ns3plug, &pda);