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>
This commit is contained in:
Alexey Khoroshilov 2015-03-14 01:34:41 +03:00 committed by Greg Kroah-Hartman
parent a1c6dcda80
commit 20ff1418d3
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}