Subject: Re: [PATCH] libertas_tf: avoid a null dereference in pointer priv

From: Kalle Valo <[email-masked]>
Date: Wed, 6 May 2020 08:44:42 +0000 (UTC)

Colin King <[email-masked]> wrote:

> From: Colin Ian King <[email-masked]>
> 
> Currently there is a check if priv is null when calling lbtf_remove_card
> but not in a previous call to if_usb_reset_dev that can also dereference
> priv.  Fix this by also only calling lbtf_remove_card if priv is null.
> 
> It is noteable that there don't seem to be any bugs reported that the
> null pointer dereference has ever occurred, so I'm not sure if the null
> check is required, but since we're doing a null check anyway it should
> be done for both function calls.
> 
> Addresses-Coverity: ("Dereference before null check")
> Fixes: baa0280f08c7 ("libertas_tf: don't defer firmware loading until start()")
> Signed-off-by: Colin Ian King <[email-masked]>

Patch applied to wireless-drivers-next.git, thanks.

049ceac308b0 libertas_tf: avoid a null dereference in pointer priv

-- 
https://patchwork.kernel.org/patch/11523055/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches