Message ID | 20230314170113.11968-1-listdansp@mail.ru |
---|---|
Headers | show |
Series | usb: musb: core: drop redundant checks | expand |
On 3/14/23 8:01 PM, Danila Chernetsov wrote: > From: Sergey Shtylyov <s.shtylyov@omp.ru> > > commit b0ec7e55fce65f125bd1d7f02e2dc4de62abee34 upstream. > > In musb_{save|restore}_context() the expression '&musb->endpoints[i]' just > cannot be NULL, so the checks have no sense at all -- after dropping them, > the local variables 'hw_ep' are no longer necessary, so drop them as well. > > Found by Linux Verification Center (linuxtesting.org) with the SVACE static > analysis tool. > > Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> > Link: https://lore.kernel.org/r/3f8f60d9-f1b5-6b2c-1222-39b156151a22@omp.ru > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Signed-off-by: Danila Chernetsov <listdansp@mail.ru> > --- > drivers/usb/musb/musb_core.c | 16 ++-------------- > 1 file changed, 2 insertions(+), 14 deletions(-) Hum... why do you need it it 5.10.y? [...] MBR, Sergey
On Wed, Mar 15, 2023 at 07:16:44AM +0300, listdansp wrote: > This patch was prepare in according to secure programming conception. I do not understand what that means. > In practice it indeed simply remove unused code. Yes, it did, but why should that be added to a stable kernel tree? > If you're thinking, that this patch is useless, we don't insist on applying > it. I'm confused as to why you thought it should have been applied at all. Why did your testing deem it needed? thanks, greg k-h