usb: cdnsp: fix cdnsp_decode_trb function to properly handle ret value
authorPawel Laszczak <pawell@cadence.com>
Wed, 12 Jan 2022 05:32:37 +0000 (06:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Jan 2022 12:59:20 +0000 (13:59 +0100)
commit03db9289b5ab59437e42a111a34545a7cedb5190
tree29a9f29d48d2fd7b898dfa35d6635f045c750609
parenta102f07e4edf0f1cf06bf9825ab10e26a29dd945
usb: cdnsp: fix cdnsp_decode_trb function to properly handle ret value

Variable ret in function cdnsp_decode_trb is initialized but not
used. To fix this compiler warning patch adds checking whether the
data buffer has not been overflowed.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Link: https://lore.kernel.org/r/20220112053237.14309-1-pawell@gli-login.cadence.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/cdns3/cdnsp-debug.h