diff mbox

iwlwifi: mvm: remove some dead code

Message ID 20150507095844.GA17996@mwanda (mailing list archive)
State Changes Requested
Delegated to: Johannes Berg
Headers show

Commit Message

Dan Carpenter May 7, 2015, 9:58 a.m. UTC
"ret" is zero here so we can remove this stray check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Johannes Berg May 7, 2015, 12:27 p.m. UTC | #1
On Thu, 2015-05-07 at 12:58 +0300, Dan Carpenter wrote:
> "ret" is zero here so we can remove this stray check.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/net/wireless/iwlwifi/mvm/fw.c b/drivers/net/wireless/iwlwifi/mvm/fw.c
> index df86963..41f4763 100644
> --- a/drivers/net/wireless/iwlwifi/mvm/fw.c
> +++ b/drivers/net/wireless/iwlwifi/mvm/fw.c
> @@ -663,8 +663,6 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
>  		 */
>  		_iwl_trans_stop_device(mvm->trans, false);
>  		_iwl_trans_start_hw(mvm->trans, false);
> -		if (ret)
> -			return ret;

It looks like "ret = _iwl_trans_start_hw(...)" was intended though?

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dan Carpenter May 7, 2015, 12:42 p.m. UTC | #2
On Thu, May 07, 2015 at 02:27:15PM +0200, Johannes Berg wrote:
> On Thu, 2015-05-07 at 12:58 +0300, Dan Carpenter wrote:
> > "ret" is zero here so we can remove this stray check.
> > 
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > 
> > diff --git a/drivers/net/wireless/iwlwifi/mvm/fw.c b/drivers/net/wireless/iwlwifi/mvm/fw.c
> > index df86963..41f4763 100644
> > --- a/drivers/net/wireless/iwlwifi/mvm/fw.c
> > +++ b/drivers/net/wireless/iwlwifi/mvm/fw.c
> > @@ -663,8 +663,6 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
> >  		 */
> >  		_iwl_trans_stop_device(mvm->trans, false);
> >  		_iwl_trans_start_hw(mvm->trans, false);
> > -		if (ret)
> > -			return ret;
> 
> It looks like "ret = _iwl_trans_start_hw(...)" was intended though?
> 

Hm...  You may be right.  Should it also be "goto error;" instead of a
direct return?  I'm not positive.  Eran can you fix this and give me a
Reported-by tag?

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Johannes Berg May 7, 2015, 12:47 p.m. UTC | #3
On Thu, 2015-05-07 at 15:42 +0300, Dan Carpenter wrote:

> > >  		_iwl_trans_stop_device(mvm->trans, false);
> > >  		_iwl_trans_start_hw(mvm->trans, false);
> > > -		if (ret)
> > > -			return ret;
> > 
> > It looks like "ret = _iwl_trans_start_hw(...)" was intended though?
> > 
> 
> Hm...  You may be right.  Should it also be "goto error;" instead of a
> direct return?  I'm not positive.

Yes, looks like.

> Eran can you fix this and give me a Reported-by tag?

I think Eran is on sabbatical, I'll get this on the way internally with
your reported-by.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/iwlwifi/mvm/fw.c b/drivers/net/wireless/iwlwifi/mvm/fw.c
index df86963..41f4763 100644
--- a/drivers/net/wireless/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/iwlwifi/mvm/fw.c
@@ -663,8 +663,6 @@  int iwl_mvm_up(struct iwl_mvm *mvm)
 		 */
 		_iwl_trans_stop_device(mvm->trans, false);
 		_iwl_trans_start_hw(mvm->trans, false);
-		if (ret)
-			return ret;
 	}
 
 	if (iwlmvm_mod_params.init_dbg)