t...@redhat.com wrote:

> From: Tom Rix <t...@redhat.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 <t...@redhat.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

Reply via email to