[bug report] staging: rtl8188eu: fix missing unlock on error in rtw_resume_process()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Wei Yongjun,

The patch eaf47b713b60: "staging: rtl8188eu: fix missing unlock on
error in rtw_resume_process()" from Aug 26, 2016, leads to the
following static checker warning:

	drivers/staging/rtl8188eu/os_dep/usb_intf.c:311 rtw_resume_process()
	error: double unlock 'mutex:&pwrpriv->mutex_lock'

drivers/staging/rtl8188eu/os_dep/usb_intf.c
   295  
   296          pr_debug("bkeepfwalive(%x)\n", pwrpriv->bkeepfwalive);
   297          if (pm_netdev_open(pnetdev, true) != 0)
   298                  goto exit;
   299  
   300          netif_device_attach(pnetdev);
   301          netif_carrier_on(pnetdev);
   302  
   303          mutex_unlock(&pwrpriv->mutex_lock);
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unlock.

   304  
   305          rtw_roaming(padapter, NULL);
   306  
   307          ret = 0;
   308  exit:
   309          if (pwrpriv) {
   310                  pwrpriv->bInSuspend = false;
   311                  mutex_unlock(&pwrpriv->mutex_lock);
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unlock again.

   312          }
   313          pr_debug("<===  %s return %d.............. in %dms\n", __func__,
   314                  ret, jiffies_to_msecs(jiffies - start_time));
   315  
   316          return ret;
   317  }


regards,
dan carpenter
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux