Re: [PATCH] USB: realtek_cr: fix return check for dma functions

2020-08-11 Thread Alan Stern
On Tue, Aug 11, 2020 at 11:54:28AM -0700, Tom Rix wrote: > > On 8/11/20 10:53 AM, Alan Stern wrote: > >>> Instead of changing all these call sites, wouldn't it be a lot easier > >>> just to change rts51x_read_mem() to make it always return a negative > >>> value (such as -EIO) when there's an e

Re: [PATCH] USB: realtek_cr: fix return check for dma functions

2020-08-11 Thread Tom Rix
On 8/11/20 10:53 AM, Alan Stern wrote: > On Tue, Aug 11, 2020 at 10:29:29AM -0700, Tom Rix wrote: >> On 8/11/20 9:03 AM, Alan Stern wrote: >>> On Tue, Aug 11, 2020 at 08:15:05AM -0700, t...@redhat.com wrote: From: Tom Rix clang static analysis reports this representative problem >

Re: [PATCH] USB: realtek_cr: fix return check for dma functions

2020-08-11 Thread Alan Stern
On Tue, Aug 11, 2020 at 10:29:29AM -0700, Tom Rix wrote: > > On 8/11/20 9:03 AM, Alan Stern wrote: > > On Tue, Aug 11, 2020 at 08:15:05AM -0700, t...@redhat.com wrote: > >> From: Tom Rix > >> > >> clang static analysis reports this representative problem > >> > >> realtek_cr.c:639:3: warning: The

Re: [PATCH] USB: realtek_cr: fix return check for dma functions

2020-08-11 Thread Tom Rix
On 8/11/20 9:03 AM, Alan Stern wrote: > On Tue, Aug 11, 2020 at 08:15:05AM -0700, t...@redhat.com wrote: >> From: Tom Rix >> >> clang static analysis reports this representative problem >> >> realtek_cr.c:639:3: warning: The left expression of the compound >> assignment is an uninitialized val

Re: [PATCH] USB: realtek_cr: fix return check for dma functions

2020-08-11 Thread Alan Stern
On Tue, Aug 11, 2020 at 08:15:05AM -0700, t...@redhat.com wrote: > From: Tom Rix > > clang static analysis reports this representative problem > > realtek_cr.c:639:3: warning: The left expression of the compound > assignment is an uninitialized value. The computed value will > also be garbag

[PATCH] USB: realtek_cr: fix return check for dma functions

2020-08-11 Thread trix
From: Tom Rix clang static analysis reports this representative problem realtek_cr.c:639:3: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage SET_BIT(value, 2); ^ value is set by a successful ca