lkml.org 
[lkml]   [2014]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Staging: rtl8712 removed unnecessary else after return
From
Date
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;




\
 
 \ /
  Last update: 2014-10-01 20:21    [W:0.057 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site