Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754749AbbKHHLZ (ORCPT ); Sun, 8 Nov 2015 02:11:25 -0500 Received: from mail-lb0-f171.google.com ([209.85.217.171]:35624 "EHLO mail-lb0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751545AbbKHHLY (ORCPT ); Sun, 8 Nov 2015 02:11:24 -0500 Date: Sun, 8 Nov 2015 14:13:04 +0700 From: Ivan Safonov To: devel@driverdev.osuosl.org Cc: Greg Kroah-Hartman , Vaishali Thakkar , Jakub Sitnicki , Anish Bhatt , Joe Perches , Ivan Safonov , Nicholas Mc Guire , Alexey Khoroshilov , =?iso-8859-1?Q?R=E9my?= Oudompheng , Sudip Mukherjee , Shraddha Barke , linux-kernel@vger.kernel.org Subject: [PATCH v2 08/12] staging: rtl8188eu: if (a) ; else {...} replaced by if (!a) {...} Message-ID: <20151108071304.GA1563@alpha.sfu-kras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1484 Lines: 41 It is looks bit better. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index 7c79774..62f83ab 100644 --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c @@ -447,9 +447,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_MP_STATE)) { /* sta mode */ psta = rtw_get_stainfo(pstapriv, get_bssid(pmlmepriv)); - if (psta == NULL) { - ; - } else { + if (psta) { if (strcmp(param->u.crypt.alg, "none") != 0) psta->ieee8021x_blocked = false; @@ -482,9 +480,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, } } pbcmc_sta = rtw_get_bcmc_stainfo(padapter); - if (pbcmc_sta == NULL) { - ; - } else { + if (pbcmc_sta) { /* Jeff: don't disable ieee8021x_blocked while clearing key */ if (strcmp(param->u.crypt.alg, "none") != 0) pbcmc_sta->ieee8021x_blocked = false; -- 2.4.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/