Re: [PATCH] staging:rtl8712:Fix compressed return statement

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

 



On 06/03/2015 08:28 AM, Mutharaju, Prasanna (P.) wrote:
On Wed, Jun 03, 2015 at 02:35:35PM +0530, Sudip Mukherjee wrote:
On Wed, Jun 03, 2015 at 08:23:54AM +0000, Mutharaju, Prasanna (P.) wrote:
From: Prasanna Karthik <mkarthi3@xxxxxxxxxxx>

Fix reported by coccinelle compressing last two lines with single return
call

Signed-off-by: Prasanna Karthik <mkarthi3@xxxxxxxxxxx>
---
  drivers/staging/rtl8712/rtl871x_sta_mgt.c |    3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_sta_mgt.c b/drivers/staging/rtl8712/rtl871x_sta_mgt.c
index a9b93d0..f53b36c 100644
--- a/drivers/staging/rtl8712/rtl871x_sta_mgt.c
+++ b/drivers/staging/rtl8712/rtl871x_sta_mgt.c
@@ -274,8 +274,7 @@ struct sta_info *r8712_get_bcmc_stainfo(struct _adapter *padapter)
  	struct sta_priv *pstapriv = &padapter->stapriv;
  	u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};

-	psta = r8712_get_stainfo(pstapriv, bc_addr);
-	return psta;
+	return r8712_get_stainfo(pstapriv, bc_addr);
now we are having a build warning of unused variable 'psta'.

regards
sudip

removed psta structure declaration which is not needed in r8712_get_bcmc_stainfo() which already
having single return statement fix,which would eventually solve compiler warning.
thoughts on V2 Patch with this fix?

Obviously you need to remove the unused variable and submit V2. Please be careful and compile the code after you make a change. Otherwise you end up being regarded as a troll, and your proposed patches are ignored.

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