[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zs3GN2FH4uzzMEFY@duo.ucw.cz>
Date: Tue, 27 Aug 2024 14:27:35 +0200
From: Pavel Machek <pavel@...x.de>
To: Sasha Levin <sashal@...nel.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Jeff Johnson <quic_jjohnson@...cinc.com>,
Kalle Valo <quic_kvalo@...cinc.com>, kvalo@...nel.org,
jjohnson@...nel.org, linux-wireless@...r.kernel.org,
ath11k@...ts.infradead.org
Subject: Re: [PATCH AUTOSEL 6.1 21/61] wifi: ath11k: initialize 'ret' in
ath11k_qmi_load_file_target_mem()
Hi!
> [ Upstream commit 199f149e97dc7be80e5eed4b232529c1d1aa8055 ]
>
> smatch flagged the following issue:
>
> drivers/net/wireless/ath/ath11k/qmi.c:2401 ath11k_qmi_load_file_target_mem() error: uninitialized symbol 'ret'.
>
> The reality is that 'ret' is initialized in every path through
> ath11k_qmi_load_file_target_mem() except one, the case where the input
> 'len' is 0, and hence the "while (remaining)" loop is never entered.
> But to make sure this case is also handled, add an initializer to the
> declaration of 'ret'.
>
> No functional changes, compile tested only.
Just a cleanup. Does not match -stable rules.
Best regards,
Pavel
> +++ b/drivers/net/wireless/ath/ath11k/qmi.c
> @@ -2293,7 +2293,7 @@ static int ath11k_qmi_load_file_target_mem(struct ath11k_base *ab,
> struct qmi_txn txn;
> const u8 *temp = data;
> void __iomem *bdf_addr = NULL;
> - int ret;
> + int ret = 0;
> u32 remaining = len;
>
> req = kzalloc(sizeof(*req), GFP_KERNEL);
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)
Powered by blists - more mailing lists