From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f194.google.com (mail-dy1-f194.google.com [74.125.82.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1E7E347BD4 for ; Mon, 15 Jun 2026 23:44:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781567042; cv=none; b=pOBv4D1AVSeT6a1O6wC4p7V/ZzbHkhxwiLs07pkh+s4iTxr6XbAB8vqc3WyQhVJE0ZgMJLf/hInS5siCkeqs9f2/v+Z6ciVMuVVQjbvMHdUCz58qPENAEUpM8pEU/MYYTs8B7SnDYPLn5YPQuMZRstxXoqhwcVwn4sgA8AiWQJE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781567042; c=relaxed/simple; bh=LSxmJsRhqENT5wVxzflqb7UNcZeK9p/EwzaMh/cRNP8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=R9UoR7Ol+0fpnPzvu/FKI70wr8cyk3yj9c988H8crV1Ki68a99UfuX4avvYOuhfOeZDPuvTvzmrIXtNTmehGY3vExciz/J8+Si+6jPE9Nhm0ycAMCADomwcES8wPfgax8unYSst0hSse80+4K5D4+ewN3ObmzKGZc9zHk4hd7hY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ADLJV+tV; arc=none smtp.client-ip=74.125.82.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ADLJV+tV" Received: by mail-dy1-f194.google.com with SMTP id 5a478bee46e88-30b6dad2382so3301139eec.0 for ; Mon, 15 Jun 2026 16:44:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781567040; x=1782171840; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=z07ARaiMz6B0ZS7K3wv0bi+xVX8dJjXDhpIS7KELAP8=; b=ADLJV+tVagVDqOhDIwfZBHqcnd268YYZ6u78RgIcPagUc64u0R0Fxa/pRR8AqZF+o4 GetohR+bTU9gZjMFEq1QuBqPDe8oBjlzYLYxkkrIB4vf9tjJuYm8pgc/FaH36UO4xQEK Ib0IrdLjMUHUQiBGfjREbPUYTJCrOW0xPypZZoy4xduaxxLkb2qD2cw/CupLfujBOzU+ yps2tpB/xBcV8l10dhSNgKks3ha4KkBa2PMDmNtiQDYTqdZcYSCoFwgp+kQ8t9Otx/mA heZL2YBXmI1OormlKIR0egU6fwGJKwTPU0ZST6sJg5Bo5/n6E6dQ/z9G+ap6bMkfCMRS roqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781567040; x=1782171840; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=z07ARaiMz6B0ZS7K3wv0bi+xVX8dJjXDhpIS7KELAP8=; b=IjSFgu/7njlDyGMrDG2OEuo11JsLoiY3Dzl4Ezlo6ElbV4tWL7inj86UKg1P8rL7Kc HJtbMcWgvc4vTWIR5L2S0+PHvrPpP7in8VaoMQZWELzBFMjvEBqOCVozJIe/oHteIgmJ A2xGUd6QbpjD87NajtXeZgohLHBF7Fr5QWjKX5ViHjBFeDdMAcAhoc+P/dTpK4z6+lYo FCOuy/E2hZDU1iHufTcoImYqXq2PGTrj70fCZwoOQl9Y9XT+hDGSiEPRr+yCWtWFELLO NDGsuC5Z/uqLA8UIbuFx9Xh1AbNrhu9O6l4UancVyDrBMgWSZYbAVWsy6dzotayyJBW2 zepw== X-Forwarded-Encrypted: i=1; AFNElJ/ySEESSpUJOOkELUghGDH07VTPDTOAh9z1tBs3kf/AYkN/71VoE0LBdnceCd8btG6V78OpwMqvBHwDJnw=@vger.kernel.org X-Gm-Message-State: AOJu0YxhYOzAVlm44D8aOg18VVFay78kMEsA/IMB0pTCHSrE6OPvRRiM usqG0GW2x3ap7QCxW0sd0Eg0J+hTSTLRDmXsWO7cPVI9ps0DEoQOEI0/ X-Gm-Gg: Acq92OF5jFQitvqVTAxYcrj89aQEkfWvbGtJwvARyN/+31SB1/R6AuZ6b9mTCJ7+TE8 vfmOOMHdnpBLLRJWnVxTe/JmoRPU/58ynrVN8etkJnVNNcAvRSIIbo6v6r53OswBx/2FhPd9x2t W8Nji8CCIGbS1/Jj3mVrHIA0Gw99bYM7xOdudk+VjvE52J2O7qo3l4Jia/LzoF7x5SshLAel+f5 T3KHImtZqqXOIN1CsmdF6jCcQJEr8kkbS1oTowyJppTzPQTAQyUOSsaj8dj2oiRMMQ+OzmP89uS LqgzUNYB2S7XwqpH/69VuHsF55/XCnl6PCBTVOGy/yPSpBR/9U/44rPhNyzyQUuGGIKQ0GrNL4Z wSUQqOQb1+TBqY10NsWEeNlwEQMJPOnJLYqYGHx6lR/fFToRKOuw0to106sRaTR3e+5WEQzNjcH rOVIt7SWJHu1TpKoLN+QBHnggwZA97gdJxtl+B0+/rDgevye5LYXHBXyw= X-Received: by 2002:a05:7300:b58b:b0:304:bce8:fa30 with SMTP id 5a478bee46e88-3081ff4bb5emr8321242eec.5.1781567040007; Mon, 15 Jun 2026 16:44:00 -0700 (PDT) Received: from localhost.localdomain ([76.32.119.210]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3081e92096esm16988335eec.15.2026.06.15.16.43.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 16:43:59 -0700 (PDT) From: Hungyu Lin To: gregkh@linuxfoundation.org Cc: error27@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Hungyu Lin Subject: [PATCH v2 1/4] staging: rtl8723bs: simplify update_attrib_sec_info control flow Date: Mon, 15 Jun 2026 23:43:37 +0000 Message-Id: <20260615234340.97299-2-dennylin0707@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260615234340.97299-1-dennylin0707@gmail.com> References: <20260615234340.97299-1-dennylin0707@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Replace goto-based error handling with direct returns and remove the temporary res variable. No functional change. Signed-off-by: Hungyu Lin --- drivers/staging/rtl8723bs/core/rtw_xmit.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c index 444966c0de7f..6ab91de472b0 100644 --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c @@ -507,7 +507,6 @@ static void update_attrib_phy_info(struct adapter *padapter, struct pkt_attrib * static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_attrib *pattrib, struct sta_info *psta) { - signed int res = _SUCCESS; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct security_priv *psecuritypriv = &padapter->securitypriv; signed int bmcast = is_multicast_ether_addr(pattrib->ra); @@ -519,10 +518,8 @@ static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_attrib *p if (psta->ieee8021x_blocked) { pattrib->encrypt = 0; - if ((pattrib->ether_type != 0x888e) && !check_fwstate(pmlmepriv, WIFI_MP_STATE)) { - res = _FAIL; - goto exit; - } + if ((pattrib->ether_type != 0x888e) && !check_fwstate(pmlmepriv, WIFI_MP_STATE)) + return _FAIL; } else { GET_ENCRY_ALGO(psecuritypriv, psta, pattrib->encrypt, bmcast); @@ -560,10 +557,8 @@ static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_attrib *p pattrib->iv_len = 8; pattrib->icv_len = 4; - if (psecuritypriv->busetkipkey == _FAIL) { - res = _FAIL; - goto exit; - } + if (psecuritypriv->busetkipkey == _FAIL) + return _FAIL; if (bmcast) TKIP_IV(pattrib->iv, psta->dot11txpn, pattrib->key_idx); @@ -601,9 +596,7 @@ static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_attrib *p else pattrib->bswenc = false; -exit: - - return res; + return _SUCCESS; } u8 qos_acm(u8 acm_mask, u8 priority) -- 2.34.1