[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200818125301.5F7B7C433A1@smtp.codeaurora.org>
Date: Tue, 18 Aug 2020 12:53:01 +0000 (UTC)
From: Kalle Valo <kvalo@...eaurora.org>
To: trix@...hat.com
Cc: jussi.kivilinna@....fi, davem@...emloft.net, kuba@...nel.org,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Tom Rix <trix@...hat.com>
Subject: Re: [PATCH] rndis_wlan: tighten check of rndis_query_oid return
trix@...hat.com wrote:
> From: Tom Rix <trix@...hat.com>
>
> clang static analysis reports this problem
>
> rndis_wlan.c:3147:25: warning: Assigned value is garbage or undefined
> wiphy->max_num_pmkids = le32_to_cpu(caps.num_pmkids);
> ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> The setting of caps happens here, with a call to rndis_query_oid()
>
> retval = rndis_query_oid(usbdev,
> if (retval >= 0) {
>
> Reviewing rndis_query_oid() shows that on success 0 is returned,
> failure is otherwise. So the retval check is not tight enough.
> So tighten the retval check. Similar problem in
> rndis_wlan_get_caps().
>
> Signed-off-by: Tom Rix <trix@...hat.com>
Patch applied to wireless-drivers-next.git, thanks.
094dd0d73062 rndis_wlan: tighten check of rndis_query_oid return
--
https://patchwork.kernel.org/patch/11709263/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Powered by blists - more mailing lists