From: Heena Sirwani Date: Tue, 7 Oct 2014 09:15:56 +0000 (+0530) Subject: Staging: rtl8723au: os_dep: Removed variable that is always 0. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=911f2921c41cece94689bc0bb4dc9f7723d40839;p=linux-beck.git Staging: rtl8723au: os_dep: Removed variable that is always 0. The following patch removes a variable that is always 0 using coccinelle. The semaintic patch used is as follows: @@ identifier ret; @@ -int ret = 0; ... when != ret when strict -return ret; +return 0; Signed-off-by: Heena Sirwani Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index bd6953af0a03..de2a3f546cfb 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c @@ -471,7 +471,6 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, u8 key_index, int set_tx, const u8 *sta_addr, struct key_params *keyparms) { - int ret = 0; int key_len; struct sta_info *psta = NULL, *pbcmc_sta = NULL; struct rtw_adapter *padapter = netdev_priv(dev); @@ -708,7 +707,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, u8 key_index, exit: - return ret; + return 0; } #endif @@ -2432,20 +2431,16 @@ void rtw_cfg80211_indicate_sta_disassoc(struct rtw_adapter *padapter, static int rtw_cfg80211_monitor_if_open(struct net_device *ndev) { - int ret = 0; - DBG_8723A("%s\n", __func__); - return ret; + return 0; } static int rtw_cfg80211_monitor_if_close(struct net_device *ndev) { - int ret = 0; - DBG_8723A("%s\n", __func__); - return ret; + return 0; } static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, @@ -2574,11 +2569,9 @@ fail: static int rtw_cfg80211_monitor_if_set_mac_address(struct net_device *ndev, void *addr) { - int ret = 0; - DBG_8723A("%s\n", __func__); - return ret; + return 0; } static const struct net_device_ops rtw_cfg80211_monitor_if_ops = {