Date: Thu, 20 Apr 2023 11:00:11 +0200 A local variable was used only within an if branch. Thus move the definition for the variable “sqd” into the corresponding code block. Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> --- drivers/staging/rtl8712/rtl8712_recv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/rtl8712_recv.c b/drivers/staging/rtl8712/rtl8712_recv.c index 3a72d0601dc0..9135c92906ac 100644 --- a/drivers/staging/rtl8712/rtl8712_recv.c +++ b/drivers/staging/rtl8712/rtl8712_recv.c @@ -863,10 +863,11 @@ static void process_link_qual(struct _adapter *padapter, union recv_frame *prframe) { struct rx_pkt_attrib *pattrib; - struct smooth_rssi_data *sqd = &padapter->recvpriv.signal_qual_data; pattrib = &prframe->u.hdr.attrib; if (pattrib->signal_qual != 0) { + struct smooth_rssi_data *sqd = &padapter->recvpriv.signal_qual_data; + /* * 1. Record the general EVM to the sliding window. */ -- 2.40.0