Re: [PATCH 10/13] staging: r8188eu: Remove wrapper _enter_critical_mutex()

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

 



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

_______________________________________________
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