lkml.org 
[lkml]   [2021]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RFC 0/3] staging: r8188eu: avoid uninit value bugs
From
Date
On 8/22/21 3:39 PM, Greg KH wrote:
>>
>> Yes, but _rtw_read*() == 0 indicates 2 states:
>>
>> 1. Error on transfer side
>> 2. Actual register value is 0
>
> That's not a good design, it should be fixed. Note there is the new
> usb_control_msg_recv() function which should probably be used instead
> here, to prevent this problem from happening.
>

Thank you, Greg, for confirmation. That's was the point why I started to
write this series :)

I think, usb_control_msg_recv() won't help us with this problem, since
all rtw_read*() functions return an unsigned value now. In future, when
driver code will be fixed (ex: a lot of void function, which can fail
and leave passed pointer uninitialized) we can move to new usb API and
then move driver out of staging :)


With regards,
Pavel Skripkin

\
 
 \ /
  Last update: 2021-08-22 14:51    [W:0.139 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site