summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8188eu/os_dep/usb_intf.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: rtl8188eu: remove rtl8188eu driver from staging dirPhillip Potter2021-08-011-479/+0
| | | | | | | | | | | This driver was deprecated with the introduction of the r8188eu driver, based upon Realtek sources that were modified for CFG80211 support and other fixes on GitHub by Larry Finger. As that driver is now progressing at pace, we should remove this one. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210731133809.196681-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: remove unnecessary loggingJan Gruber2021-07-211-5/+0
| | | | | | | | | | | | | | | | | | | | This commit fixes the following checkpatch.pl issues: + pr_debug("===> %s\n", __func__); WARNING: Unnecessary ftrace-like logging - prefer using ftrace 158: FILE: drivers/staging/rtl8188eu/os_dep/usb_intf.c:158: WARNING: Unnecessary ftrace-like logging - prefer using ftrace 177: FILE: drivers/staging/rtl8188eu/os_dep/usb_intf.c:177: + pr_debug("<=== %s\n", __func__); and removes another line of unnecessary logging, which was not identified by checkpatch.pl in an automated manner. Signed-off-by: Jan Gruber <j4n6ru@gmail.com> Link: https://lore.kernel.org/r/20210705172101.239899-1-j4n6ru@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: remove unnecessary bracesJan Gruber2021-07-211-2/+1
| | | | | | | | | This commit fixes the following checkpatch.pl warning: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Jan Gruber <j4n6ru@gmail.com> Link: https://lore.kernel.org/r/20210705072125.199810-1-j4n6ru@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: remove RT_TRACE prints from usb_intf.cMartin Kaiser2021-06-241-27/+1
| | | | | | | | | Eventually, all driver-specific debug prints should be removed. Take another step in that direction. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210620175301.14988-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: handle errors from dev_alloc_nameMartin Kaiser2021-06-241-1/+4
| | | | | | | | | | Fail the usb interface initialization if dev_alloc_name returns an error. Other wlan drivers like natsemi or atmel use the same error handling. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210620175301.14988-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: remove all DBG_88E calls from os_dep/usb_intf.cPhillip Potter2021-06-151-1/+0
| | | | | | | | | | | Remove all DBG_88E calls from os_dep/usb_intf.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210615001507.1171-13-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: make rtw_usb_if1_init return a statusMartin Kaiser2021-04-081-14/+14
| | | | | | | | | | Return an error status instead of the struct adapter that was allocated and filled. This is more useful for the probe function, who calls rtw_usb_if1_init. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210407170531.29356-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: make usb_dvobj_init return a statusMartin Kaiser2021-04-081-16/+10
| | | | | | | | | | usb_dvobj_init populates a struct dvobj_priv and installs it as interface data of the usb interface. There's no point in returning this struct to the caller, it makes more sense to return an error status. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210407170531.29356-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: rtw_usb_if1_init needs no dvobj parameterMartin Kaiser2021-04-081-3/+3
| | | | | | | | | rtw_usb_if1_init receives a pointer to struct usb_interface. dvobj is the interface data for this interface. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210407170531.29356-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: remove unnecessary variableMartin Kaiser2021-04-081-4/+2
| | | | | | | | | We just want to check if rtw_usb_if1_init returns NULL, which means there was an error. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210407170531.29356-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: (trivial) remove a duplicate debug printMartin Kaiser2021-04-021-1/+0
| | | | | | | | Keep the one that shows the wakeup capability. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210329093215.16186-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: remove unused function parameterMartin Kaiser2021-04-021-3/+2
| | | | | | | | rtw_usb_if1_init does not use its struct usb_device_id parameter. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210328175446.28063-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Fix null pointer dereference on free_netdev callColin Ian King2021-03-261-1/+2
| | | | | | | | | | | | | An unregister_netdev call checks if pnetdev is null, hence a later call to free_netdev can potentially be passing a null pointer, causing a null pointer dereference. Avoid this by adding a null pointer check on pnetdev before calling free_netdev. Fixes: 1665c8fdffbb ("staging: rtl8188eu: use netdev routines for private data") Reviewed-by: Martin Kaiser <martin@kaiser.cx> Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210324152135.254152-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: use netdev routines for private dataMartin Kaiser2021-03-221-17/+10
| | | | | | | | | | This driver implements its own routines to allocate, access and free the private data of its net_device. Use the functionality from the networking core instead. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210321162009.15447-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Add Edimax EW-7811UN V2 to device tableMartin Kaiser2021-02-041-0/+1
| | | | | | | | | | The Edimax EW-7811UN V2 uses an RTL8188EU chipset and works with this driver. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210204085217.9743-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: r8188eu: inline rtw_init_netdev_name()Ivan Safonov2020-10-261-1/+5
| | | | | | | | | The rtw_init_netdev_name() is a small function that is used once and does not encapsulate any logic. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Link: https://lore.kernel.org/r/20201018201132.40480-1-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: clean up alignment style issuesMichael Straube2020-09-221-13/+14
| | | | | | | | | | | Clean up alignment style issues to follow kernel coding style and clear checkpatch issues. CHECK: Alignment should match open parenthesis Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200919090040.9613-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: clean up block comment style issuesMichael Straube2020-09-221-5/+6
| | | | | | | | | | | | | Clean up block comment style issues to follow kernel coding style and clear checkpatch warnings. WARNING: Block comments should align the * on each line WARNING: Block comments use a trailing */ on a separate line WARNING: Block comments use * on subsequent lines Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200919090040.9613-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: use __func__ in os_depMichael Straube2020-09-011-7/+7
| | | | | | | | | Use __func__ instead of hardcoded function names to clear checkpatch warnings. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200830072140.14178-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Add ASUS USB-N10 Nano B1 to device tableLarry Finger2020-03-231-0/+1
| | | | | | | | | | | The ASUS USB-N10 Nano B1 has been reported as a new RTL8188EU device. Add it to the device tables. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Reported-by: kovi <zraetn@gmail.com> Cc: Stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200321180011.26153-1-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Add device id for MERCUSYS MW150US v2Michael Straube2020-03-171-0/+1
| | | | | | | | | | | This device was added to the stand-alone driver on github. Add it to the staging driver as well. Link: https://github.com/lwfinger/rtl8188eu/commit/2141f244c3e7 Signed-off-by: Michael Straube <straube.linux@gmail.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200312093652.13918-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Add device code for TP-Link TL-WN727N v5.21Michael Straube2020-01-031-0/+1
| | | | | | | | | | | This device was added to the stand-alone driver on github. Add it to the staging driver as well. Link: https://github.com/lwfinger/rtl8188eu/commit/b9b537aa25a8 Signed-off-by: Michael Straube <straube.linux@gmail.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20191228143725.24455-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: fix interface sanity checkJohan Hovold2019-12-101-1/+1
| | | | | | | | | | | | | | Make sure to use the current alternate setting when verifying the interface descriptors to avoid binding to an invalid interface. Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: c2478d39076b ("staging: r8188eu: Add files for new driver - part 20") Cc: stable <stable@vger.kernel.org> # 3.12 Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20191210114751.5119-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: fix null dereference when kzalloc failsConnor Kuehl2019-10-011-2/+4
| | | | | | | | | | | | | | | | | If kzalloc() returns NULL, the error path doesn't stop the flow of control from entering rtw_hal_read_chip_version() which dereferences the null pointer. Fix this by adding a 'goto' to the error path to more gracefully handle the issue and avoid proceeding with initialization steps that we're no longer prepared to handle. Also update the debug message to be more consistent with the other debug messages in this function. Addresses-Coverity: ("Dereference after null check") Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com> Link: https://lore.kernel.org/r/20190927214415.899-1-connor.kuehl@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 5.0-rc4 into staging-nextGreg Kroah-Hartman2019-01-281-0/+1
|\ | | | | | | | | | | We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: rtl8188eu: Add device code for D-Link DWA-121 rev B1Michael Straube2019-01-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | This device was added to the stand-alone driver on github. Add it to the staging driver as well. Link: https://github.com/lwfinger/rtl8188eu/commit/a0619a07cd1e Signed-off-by: Michael Straube <straube.linux@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: rtl8188eu: Refactoring struct ndis_802_11_ssid from CamelCase to ↵Florian Büstgens2019-01-151-3/+3
|/ | | | | | | | | | | correct code style. rtl8188eu uses CamelCase for many struct members. Refactors the ndis_802_11_ssid members Ssid and SsidLength to keep correct code style. Issue found by checkpatch. Signed-off-by: Florian Büstgens <flbue@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: fix comparsions to NULL - styleMichael Straube2018-08-021-3/+3
| | | | | | | | Use x instead of x != NULL. Use !x instead of x == NULL. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: fix indentation - styleMichael Straube2018-08-021-1/+1
| | | | | | | | Fix indentation to clear checkpatch warnings. WARNING: suspect code indent for conditional statements Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: remove blank linesMichael Straube2018-07-241-1/+0
| | | | | | | Remove unrequired blank lines reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: add SPDX identifiersMichael Straube2018-06-261-9/+1
| | | | | | | | | | | This satisfies a checkpatch warning and is the preferred method for notating the license. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Remove unneeded castChristopher Diaz Riveros2018-02-221-1/+1
| | | | | | | | | | | | Fix Coccinelle alert: drivers/staging//rtl8188eu/os_dep/usb_intf.c:336:13-27: WARNING: casting value returned by memory allocation function to (struct adapter *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 4.13-rc7 into staging-nextGreg Kroah-Hartman2017-08-281-0/+1
|\ | | | | | | | | | | We want the staging and iio fixes in here to handle the merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: rtl8188eu: add RNX-N150NUB supportCharles Milette2017-08-181-0/+1
| | | | | | | | | | | | | | | | | | Add support for USB Device Rosewill RNX-N150NUB. VendorID: 0x0bda, ProductID: 0xffef Signed-off-by: Charles Milette <charles.milette@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: rtl8188eu: constify usb_device_idArvind Yadav2017-08-181-1/+1
|/ | | | | | | | | usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by <linux/usb.h> work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: add TL-WN722N v2 supportMichael Gugino2017-07-181-0/+1
| | | | | | | | | Add support for USB Device TP-Link TL-WN722N v2. VendorID: 0x2357, ProductID: 0x010c Signed-off-by: Michael Gugino <michael.gugino.2@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Fixed 'Missing a blank line after declarations' warnings.Yamanappagouda Patil2017-01-031-0/+1
| | | | | | | | Fixed checkpatch.pl 'Missing a blank line after declarations' in rtl8188eu module. Signed-off-by: Yamanappagouda Patil <goudapatilk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:r8188eu: remove intf_stop member of adapter structureIvan Safonov2016-10-161-5/+2
| | | | | | | call usb_intf_stop directly. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:r8188eu: remove pm_netdev_open functionIvan Safonov2016-10-161-1/+1
| | | | | | | netdev_open and ips_netdrv_open are used instead of pm_netdev_open. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:r8188eu: remove wrappers for rtw_hal_inirp_init functionIvan Safonov2016-10-161-10/+0
| | | | | | | There is no reason to use these wrappers. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: fix double unlock error in rtw_resume_process()Wei Yongjun2016-10-021-4/+4
| | | | | | | | | | | Fix following static checker warning: drivers/staging/rtl8188eu/os_dep/usb_intf.c:311 rtw_resume_process() error: double unlock 'mutex:&pwrpriv->mutex_lock' Fixes: eaf47b713b60 ("staging: rtl8188eu: fix missing unlock on error in rtw_resume_process()") Reported-By: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: r8188eu: remove usb_hal.hIvan Safonov2016-09-201-1/+0
| | | | | | | usb_hal.h is empty. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: r8188eu: remove rtl8188eu_set_hal_ops functionIvan Safonov2016-09-201-2/+5
| | | | | | | | rtl8188eu_set_hal_ops only allocates HalData member of adapter structure. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: remove rtw_proc_{init,remove}_oneLuca Ceresoli2016-09-121-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rtw_proc_init_one() and rtw_proc_remove_one() are two very long functions that are supposed to create a bunch of proc entries to access debugging features of the driver. But both of them are under #if 0 since their first commit three years ago (5adef66acf73705ae95ea0b1e6b5fc7f17d82d30), replaced by two empty functions. Should they be moved out of #if 0 thay would not even compile, as they used functions that have been removed years ago (create_proc_read_entry()) and they use variables that are not defined (e.g. rtw_proc_cnt). rtw_proc_init_one() mentions several other functions that are not mentioned anywhere else in the kernel tree. Thus, after the present patch, all of those other functions can be cleanly removed as well, as they will be not mentioned anymore, not even in disabled code. Subsequent commits remove those other functions. Should anybody want to implement (in a proper way) the mentioned debugging features, they can still fetch this code from the git history. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Kyle Kuffermann <kyle.kuffermann@gmail.com> Cc: Binoy Jayan <binoy.jayan@linaro.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: "Rémy Oudompheng" <remyoudompheng@gmail.com> Cc: Ivan Safonov <insafonov@gmail.com> Cc: Jakub Sitnicki <jsitnicki@gmail.com> Cc: Alexey Khoroshilov <khoroshilov@ispras.ru> Cc: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Cc: Bhumika Goyal <bhumirks@gmail.com> Cc: devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: r8188eu: remove hal_set_hal_ops macroIvan Safonov2016-09-121-1/+1
| | | | | | | hal_set_hal_ops is a trivial wrapper for rtl8188eu_set_hal_ops. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: r8188eu: remove nr_endpoint member of dvobj_priv structureIvan Safonov2016-09-121-2/+1
| | | | | | | nr_endpoint used as local variable. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: r8188eu: remove ep_num member of dvobj_priv structureIvan Safonov2016-09-121-1/+0
| | | | | | | Value of the ep_num does not used. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: r8188eu: remove usb_vendor_req_buf member of dvobj_privIvan Safonov2016-09-121-8/+0
| | | | | | | Memory allocation moved into usbctrl_vendorreq function. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: fix missing unlock on error in rtw_resume_process()Wei Yongjun2016-09-011-1/+3
| | | | | | | | Add the missing unlock before return from function rtw_resume_process() in the error handling case. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* rtl8188eu: pwrctrl_priv: Replace semaphore 'lock' with mutexBinoy Jayan2016-08-211-4/+4
| | | | | | | | | | | | | | The semaphore 'lock' in pwrctrl_priv is a simple mutex, so it should be written as one. Semaphores are going away in the future. _enter_pwrlock was using down_interruptible(), so the lock could be broken by sending a signal. This could be a bug, because nothing checks the return code here. Hence, using mutex_lock instead of the interruptible version. Also, remove the now unused wrappers _init_pwrlock, _enter_pwrlock, _exit_pwrlock and _rtw_down_sema. Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>