Browse Source

Staging: wlan-ng: Handle error condition.

Handle error condition.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sandhya Bankar 9 years ago
parent
commit
c631cb07b4
1 changed files with 4 additions and 0 deletions
  1. 4 0
      drivers/staging/wlan-ng/prism2fw.c

+ 4 - 0
drivers/staging/wlan-ng/prism2fw.c

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