Commit 4610e57a authored by Sevinj Aghayeva's avatar Sevinj Aghayeva Committed by Greg Kroah-Hartman
Browse files

staging: rtl8723bs: Remove redundant else branches.



This patch fixes the following checkpatch.pl warning:

WARNING: else is not generally useful after a break or return

Signed-off-by: default avatarSevinj Aghayeva <sevinj.aghayeva@gmail.com>
Link: https://lore.kernel.org/r/20220329140904.GA3566@ubuntu


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 610e8066
Loading
Loading
Loading
Loading
+13 −19
Original line number Diff line number Diff line
@@ -94,17 +94,15 @@ bool rtw_is_cckratesonly_included(u8 *rate)

int rtw_check_network_type(unsigned char *rate, int ratelen, int channel)
{
	if (channel > 14) {
	if (channel > 14)
		return WIRELESS_INVALID;
	} else { /*  could be pure B, pure G, or B/G */
	/* could be pure B, pure G, or B/G */
	if (rtw_is_cckratesonly_included(rate))
		return WIRELESS_11B;
		else if (rtw_is_cckrates_included(rate))
	if (rtw_is_cckrates_included(rate))
		return WIRELESS_11BG;
		else
	return WIRELESS_11G;
}
}

u8 *rtw_set_fixed_ie(unsigned char *pbuf, unsigned int len, unsigned char *source,
				unsigned int *frlen)
@@ -151,11 +149,10 @@ u8 *rtw_get_ie(u8 *pbuf, signed int index, signed int *len, signed int limit)
		if (*p == index) {
			*len = *(p + 1);
			return p;
		} else {
		}
		tmp = *(p + 1);
		p += (tmp + 2);
		i += (tmp + 2);
		}
		if (i >= limit)
			break;
	}
@@ -199,9 +196,8 @@ u8 *rtw_get_ie_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui, u8 oui_len, u8 *ie, u
				*ielen = in_ie[cnt+1]+2;

			break;
		} else {
			cnt += in_ie[cnt+1]+2; /* goto next */
		}
		cnt += in_ie[cnt+1]+2; /* goto next */
	}

	return target_ie;
@@ -697,9 +693,8 @@ u8 *rtw_get_wps_ie(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen)
			cnt += in_ie[cnt+1]+2;

			break;
		} else {
			cnt += in_ie[cnt+1]+2; /* goto next */
		}
		cnt += in_ie[cnt+1]+2; /* goto next */
	}

	return wpsie_ptr;
@@ -748,9 +743,8 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id, u8 *buf_att
				*len_attr = attr_len;

			break;
		} else {
			attr_ptr += attr_len; /* goto next */
		}
		attr_ptr += attr_len; /* goto next */
	}

	return target_attr_ptr;