[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7dad295f-2ac4-d6ff-8d8a-17db8ef18c12@gmail.com>
Date: Fri, 6 May 2022 10:23:39 +0300
From: Pavel Skripkin <paskripkin@...il.com>
To: Wang Cheng <wanngchenng@...il.com>, dan.carpenter@...cle.com
Cc: linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] staging: rtl8712: fix uninit-value in usb_read8()
and friends
Hi Wang,
On 5/6/22 06:15, Wang Cheng wrote:
> When r8712_usbctrl_vendorreq() returns negative, 'data' in
> usb_read{8,16,32} will not be initialized.
[code snip]
> + status = r8712_usbctrl_vendorreq(intfpriv, request, wvalue, index,
> + &data, len, requesttype);
> + if (status < 0)
> + return 0;
> return le32_to_cpu(data);
> }
>
Why do you believe that 0 is not valid register value? And if it's
possible then how you can identify an error?
With regards,
Pavel Skripkin
Powered by blists - more mailing lists