isdn/bas_gigaset: fix a leak on failure path in gigaset_probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 25 Jul 2014 22:34:31 +0000 (02:34 +0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Jul 2014 19:18:34 +0000 (12:18 -0700)
There is a lack of usb_put_dev(udev) on failure path in gigaset_probe().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/gigaset/bas-gigaset.c

index c44950d3eb7b48f8a81fd16db9e46ecd15343a39..b7ae0a0dd5b6814c61332d3f56b4b7626754ddea 100644 (file)
@@ -2400,6 +2400,7 @@ allocerr:
 error:
        freeurbs(cs);
        usb_set_intfdata(interface, NULL);
+       usb_put_dev(udev);
        gigaset_freecs(cs);
        return rc;
 }