On Wed, 2014-10-01 at 16:44 +0200, Nitin Kuppelur wrote:
> Removed unnecessary else after return to solve
> checkpatch.pl warning
[]
> diff --git a/drivers/staging/rtl8712/hal_init.c 
> b/drivers/staging/rtl8712/hal_init.c
[]
> @@ -389,10 +389,8 @@ uint rtl871x_hal_init(struct _adapter *padapter)
>       padapter->hw_init_completed = false;
>       if (padapter->halpriv.hal_bus_init == NULL)
>               return _FAIL;
> -     else {
> -             if (padapter->halpriv.hal_bus_init(padapter) != _SUCCESS)
> -                     return _FAIL;
> -     }
> +     if (padapter->halpriv.hal_bus_init(padapter) != _SUCCESS)
> +             return _FAIL;

Perhaps a more common style is to use:

        if (!padapter->halpriv.hal_bus_init ||
            padapter->halpriv.hal_bus_init(padapter) != _SUCCESS)
                return _FAIL;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to