Re: [PATCH] staging: rtl8188eu: style fixes

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

 



On 21-04, Stephen Rothwell wrote:
> Hi Galo,
> 
> On Fri, 21 Apr 2017 10:06:25 +0200 Galo <anglor@xxxxxxxxx> wrote:
> >
> > @@ -1461,7 +1460,7 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv
> >  			goto exit;
> >  	}
> >  
> > -	if (*candidate == NULL || (*candidate)->network.Rssi < competitor->network.Rssi) {
> > +	if (!candidate || (*candidate)->network.Rssi < competitor->network.Rssi) {
> 
> These are not equivalent.  It should be "!*candidate"
> 
> -- 
> Cheers,
> Stephen Rothwell
> 

Thanks a lot for catching this.  I blindly copied from the checkpatch
suggestion, which is indeed wrong:

    CHECK: Comparison to NULL could be written "!candidate"
    #216: FILE: drivers/staging/rtl8188eu/core/rtw_mlme.c:1463:
    +       if (*candidate == NULL || (*candidate)->network.Rssi <
    competitor->network.Rssi)  {}

Fixing this in a new version of the patch, I'll report the issue in
checkpatch separately.

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



[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux