diff options
author | Alexey Khoroshilov <khoroshilov@ispras.ru> | 2015-03-14 01:34:41 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-20 13:41:38 +0100 |
commit | 20ff1418d3936f76df24f5694c6b5eb9179a565f (patch) | |
tree | aaadeaf962a11850c3f17787b52c1ab092b914fd /drivers/staging/vt6656 | |
parent | a1c6dcda80f6dbb3e9b78809235695e8828994f9 (diff) | |
download | op-kernel-dev-20ff1418d3936f76df24f5694c6b5eb9179a565f.zip op-kernel-dev-20ff1418d3936f76df24f5694c6b5eb9179a565f.tar.gz |
staging: vt6656: don't return zero on failure path in vt6656_probe()
If ieee80211_alloc_hw() fails in vt6656_probe(), it breaks off
initialization, but returns zero.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656')
-rw-r--r-- | drivers/staging/vt6656/main_usb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 71adc1f..ab3ab84 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -963,6 +963,7 @@ vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id) hw = ieee80211_alloc_hw(sizeof(struct vnt_private), &vnt_mac_ops); if (!hw) { dev_err(&udev->dev, "could not register ieee80211_hw\n"); + rc = -ENOMEM; goto err_nomem; } |