lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1412185449.3247.18.camel@joe-AO725>
Date:	Wed, 01 Oct 2014 10:44:09 -0700
From:	Joe Perches <joe@...ches.com>
To:	Nitin Kuppelur <nitinkuppelur@...il.com>
Cc:	gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: rtl8712 removed unnecessary else after return

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 majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ