usb: musb: core: drop redundant checks
authorSergey Shtylyov <s.shtylyov@omp.ru>
Sat, 18 Jun 2022 12:06:16 +0000 (15:06 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Jun 2022 14:39:16 +0000 (16:39 +0200)
commit196a58bdec7c324d6d862cba19069b77ddd48b90
tree9cc5af5bef9ec63b882ab7a8f7e75754dbd9247f
parent9d6d5303c39b8bc182475b22f45504106a07f086
usb: musb: core: drop redundant checks

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>
drivers/usb/musb/musb_core.c