[PATCH 10/13] staging: r8188eu: Remove wrapper _enter_critical_mutex()
Larry Finger
Larry.Finger at lwfinger.net
Sat Feb 15 17:23:48 UTC 2014
On 02/15/2014 04:41 AM, Dan Carpenter wrote:
> On Fri, Feb 14, 2014 at 04:54:14PM -0600, Larry Finger wrote:
>> diff --git a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
>> index 1fa5370..d5f6a32 100644
>> --- a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
>> +++ b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
>> @@ -49,7 +49,9 @@ static int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u
>> goto exit;
>> }
>>
>> - _enter_critical_mutex(&dvobjpriv->usb_vendor_req_mutex, NULL);
>> + if (mutex_lock_interruptible(&dvobjpriv->usb_vendor_req_mutex))
>> + status = -ENOMEM;
>> + goto exit;
>>
>
> Missing curly braces.
Thanks for seeing this. Fixing this also removes the uninitialized variable
warnings, which should have been a clue. Perhaps my wife is right, and I am
getting senile!
Actually a simple "return -ENOMEM" is sufficient as nothing happens at label
exit other than "return status".
Larry
More information about the devel
mailing list