[PATCH 4/9 V2] staging: rtl8192e: Fix smatch warning in rtl_wx.c

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

 



Smatch reports the following warning:

  CHECK   drivers/staging/rtl8192e/rtl_wx.c

drivers/staging/rtl8192e/rtl_wx.c +262 r8192se_wx_set_radio(16) warn: inconsistent returns sem:&priv->wx_sem: locked (258) unlocked (262)

Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
---

V2 - no changes
---
 drivers/staging/rtl8192e/rtl_wx.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl_wx.c
index 77ea4bb..93b1edb 100644
--- a/drivers/staging/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl_wx.c
@@ -255,6 +255,7 @@ static int r8192se_wx_set_radio(struct net_device *dev,
 	if ((*extra != 0) && (*extra != 1)) {
 		RT_TRACE(COMP_ERR, "%s(): set radio an err value,must 0(radio "
 			 "off) or 1(radio on)\n", __func__);
+		up(&priv->wx_sem);
 		return -1;
 	}
 	priv->sw_radio_on = *extra;
-- 
1.7.3.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/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