diff mbox

orinoco_usb: return error in ezusb_probe when alloc_orinocodev fails

Message ID 1445267700-21554-1-git-send-email-linville@tuxdriver.com (mailing list archive)
State Accepted
Delegated to: Kalle Valo
Headers show

Commit Message

John W. Linville Oct. 19, 2015, 3:15 p.m. UTC
The current code exits after alloc_orinocodev, but fails to change the
return value to something that indicates the failure.  This patch
changes the return value to -ENOMEM.

https://bugzilla.kernel.org/show_bug.cgi?id=106181

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 drivers/net/wireless/orinoco/orinoco_usb.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Kalle Valo Oct. 28, 2015, 6:56 p.m. UTC | #1
> The current code exits after alloc_orinocodev, but fails to change the
> return value to something that indicates the failure.  This patch
> changes the return value to -ENOMEM.
> 
> https://bugzilla.kernel.org/show_bug.cgi?id=106181
> 
> Signed-off-by: John W. Linville <linville@tuxdriver.com>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/orinoco/orinoco_usb.c b/drivers/net/wireless/orinoco/orinoco_usb.c
index 26a57d773d30..f2cd513d54b2 100644
--- a/drivers/net/wireless/orinoco/orinoco_usb.c
+++ b/drivers/net/wireless/orinoco/orinoco_usb.c
@@ -1576,6 +1576,7 @@  static int ezusb_probe(struct usb_interface *interface,
 				ezusb_hard_reset, NULL);
 	if (!priv) {
 		err("Couldn't allocate orinocodev");
+		retval = -ENOMEM;
 		goto exit;
 	}