staging: r8188eu: fix missing unlock in rtw_resume()
authorYang Yingliang <yangyingliang@huawei.com>
Thu, 28 Oct 2021 09:40:38 +0000 (17:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Oct 2021 09:12:05 +0000 (11:12 +0200)
Add the missing unlock before return from rtw_resume().

Fixes: 2b42bd58b321 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Acked-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20211028094038.2877341-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/os_dep/usb_intf.c

index 6b93830..5a35d9f 100644 (file)
@@ -298,8 +298,10 @@ static int rtw_resume(struct usb_interface *pusb_intf)
                pwrpriv->bkeepfwalive = false;
 
        DBG_88E("bkeepfwalive(%x)\n", pwrpriv->bkeepfwalive);
-       if (pm_netdev_open(pnetdev, true) != 0)
+       if (pm_netdev_open(pnetdev, true) != 0) {
+               mutex_unlock(&pwrpriv->lock);
                goto exit;
+       }
 
        netif_device_attach(pnetdev);
        netif_carrier_on(pnetdev);