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, 13 Apr 2022 18:59:01 +0000 (20:59 +0200)
commit052fb1c9ddfbee13ec73e73532be66c08531c26b
tree518498bd4a2b1a004d54f1f30a53940aed0a6994
parentc27576bbbe779a8cdc4144469c15baa1612f076a
usb: cdnsp: fix cdnsp_decode_trb function to properly handle ret value

[ Upstream commit 03db9289b5ab59437e42a111a34545a7cedb5190 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/cdns3/cdnsp-debug.h