On Fri, 2017-02-17 at 22:41 +0100, Shiva Kerdel wrote:
> Braces should be used on all arms of these statements (CHECK)..
[]
> diff --git a/drivers/staging/ks7010/ks_hostif.c 
> b/drivers/staging/ks7010/ks_hostif.c
[]
> @@ -2148,8 +2148,9 @@ void hostif_sme_mode_setup(struct ks_wlan_private *priv)
>                               else
>                                       rate_octet[i] =
>                                           priv->reg.rate_set.body[i];
> -                     } else
> +                     } else {
>                               break;
> +                     }

Generally, any time you see a form like this,
the test should be reversed

        for/while/do {
                if (foo) {
                        [bar...]
                } else {
                        break;
                }
        
should be:

        for/while/do {
                if (!foo)
                        break;
                [bar...]
        }

Reply via email to