From: Yang Yingliang Date: Thu, 28 Oct 2021 09:40:38 +0000 (+0800) Subject: staging: r8188eu: fix missing unlock in rtw_resume() X-Git-Tag: v6.6.17~8914^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=68264c4609ea74fc175d0ccc968ba16b0847ac2a;p=platform%2Fkernel%2Flinux-rpi.git staging: r8188eu: fix missing unlock in rtw_resume() 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 Acked-by: Fabio M. De Francesco Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20211028094038.2877341-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c index 6b93830..5a35d9f 100644 --- a/drivers/staging/r8188eu/os_dep/usb_intf.c +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c @@ -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);