From: Dan Carpenter Date: Tue, 19 Apr 2016 14:21:58 +0000 (-0700) Subject: mwifiex: missing error code on allocation failure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e0bdef0f75f0ee0d4747b72fa75310da78dbfa56;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mwifiex: missing error code on allocation failure We accidentally return success instead of -ENOMEM. Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/marvell/mwifiex/usb.c b/drivers/net/wireless/marvell/mwifiex/usb.c index 05108618430d..cdd8f9a867a9 100644 --- a/drivers/net/wireless/marvell/mwifiex/usb.c +++ b/drivers/net/wireless/marvell/mwifiex/usb.c @@ -1017,8 +1017,10 @@ static int mwifiex_prog_fw_w_helper(struct mwifiex_adapter *adapter, /* Allocate memory for receive */ recv_buff = kzalloc(FW_DNLD_RX_BUF_SIZE, GFP_KERNEL); - if (!recv_buff) + if (!recv_buff) { + ret = -ENOMEM; goto cleanup; + } do { /* Send pseudo data to check winner status first */