[lvc-project] [PATCH] thunderbolt: handle possible NULL pointer from get_device()
Alexey Khoroshilov
khoroshilov at ispras.ru
Fri Jun 9 11:32:58 MSK 2023
On 09.06.2023 11:05, Dmitry Antipov wrote:
> On 6/9/23 10:46, Greg KH wrote:
>
>> Again, how did you test this?
>
> Did you look at the patch header? For that particular case, the static
> analysis tool complains that the value returned by get_device() is most
> likely should be checked just because it is checked on a lot of other
> code paths. Usually it may be a good precaution to handle the very rare
> and unexpected errors; again, if you're sure that this is not the case,
> just disregard it.
Nevertheless it is your responsibility to check if such situation can
happen in practice in this particular place.
And if there are non-obvious assumptions that prevent you to make such
analysis before sending a patch, you are welcome to prepare a patch that
improves documentation.
Best regards,
Alexey
More information about the lvc-project
mailing list