From: Sandhya Bankar Date: Mon, 7 Mar 2016 10:45:59 +0000 (+0530) Subject: Staging: wlan-ng: Handle error condition. X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=c631cb07b4ac6a6c513591a581ac92a7f99da9d1;p=deliverable%2Flinux.git Staging: wlan-ng: Handle error condition. Handle error condition. Signed-off-by: Sandhya Bankar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c index 8d6ab727fd45..8564d9eb918f 100644 --- a/drivers/staging/wlan-ng/prism2fw.c +++ b/drivers/staging/wlan-ng/prism2fw.c @@ -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);