Commit f79a8a85 authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman
Browse files

staging: wilc1000: remove unnecessary always true 'if' conditions

parent efabc44b
Loading
Loading
Loading
Loading
+12 −14
Original line number Diff line number Diff line
@@ -888,7 +888,6 @@ static int del_pmksa(struct wiphy *wiphy, struct net_device *netdev,
		     struct cfg80211_pmksa *pmksa)
{
	u32 i;
	int ret = 0;
	struct wilc_vif *vif = netdev_priv(netdev);
	struct wilc_priv *priv = &vif->priv;

@@ -901,7 +900,9 @@ static int del_pmksa(struct wiphy *wiphy, struct net_device *netdev,
		}
	}

	if (i < priv->pmkid_list.numpmkid && priv->pmkid_list.numpmkid > 0) {
	if (i == priv->pmkid_list.numpmkid)
		return -EINVAL;

	for (; i < (priv->pmkid_list.numpmkid - 1); i++) {
		memcpy(priv->pmkid_list.pmkidlist[i].bssid,
		       priv->pmkid_list.pmkidlist[i + 1].bssid,
@@ -911,11 +912,8 @@ static int del_pmksa(struct wiphy *wiphy, struct net_device *netdev,
		       WLAN_PMKID_LEN);
	}
	priv->pmkid_list.numpmkid--;
	} else {
		ret = -EINVAL;
	}

	return ret;
	return 0;
}

static int flush_pmksa(struct wiphy *wiphy, struct net_device *netdev)
+2 −4
Original line number Diff line number Diff line
@@ -703,10 +703,8 @@ static void wilc_wlan_handle_rx_buff(struct wilc *wilc, u8 *buffer, int size)
			wilc_wfi_mgmt_rx(wilc, buff_ptr, pkt_len);
		} else {
			if (!is_cfg_packet) {
				if (pkt_len > 0) {
					wilc_frmw_to_host(wilc, buff_ptr,
							  pkt_len, pkt_offset);
				}
				wilc_frmw_to_host(wilc, buff_ptr, pkt_len,
						  pkt_offset);
			} else {
				struct wilc_cfg_rsp rsp;