Message ID | 20230314170113.11968-2-listdansp@mail.ru (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | usb: musb: core: drop redundant checks | expand |
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
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 4c8f0112481f..605f5cc0f18b 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -2673,13 +2673,7 @@ static void musb_save_context(struct musb *musb) musb->context.devctl = musb_readb(musb_base, MUSB_DEVCTL); for (i = 0; i < musb->config->num_eps; ++i) { - struct musb_hw_ep *hw_ep; - - hw_ep = &musb->endpoints[i]; - if (!hw_ep) - continue; - - epio = hw_ep->regs; + epio = musb->endpoints[i].regs; if (!epio) continue; @@ -2754,13 +2748,7 @@ static void musb_restore_context(struct musb *musb) musb_writeb(musb_base, MUSB_DEVCTL, musb->context.devctl); for (i = 0; i < musb->config->num_eps; ++i) { - struct musb_hw_ep *hw_ep; - - hw_ep = &musb->endpoints[i]; - if (!hw_ep) - continue; - - epio = hw_ep->regs; + epio = musb->endpoints[i].regs; if (!epio) continue;