]> git.baikalelectronics.ru Git - kernel.git/commit
USB: gadget: u_f: Unbreak offset calculation in VLAs
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 26 Aug 2020 19:21:19 +0000 (22:21 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Aug 2020 07:25:06 +0000 (09:25 +0200)
commitf118b221b5d94e2c5d164dfcdd33b0cb467f609c
tree545c1bafeb772a17cc375930efd40cdaae0244bc
parent34928c2975a962eeec04e1086ef4096268ef1a26
USB: gadget: u_f: Unbreak offset calculation in VLAs

Inadvertently the commit cbceccc1898b ("USB: gadget: u_f: add overflow checks
to VLA macros") makes VLA macros to always return 0 due to different scope of
two variables of the same name. Obviously we need to have only one.

Fixes: cbceccc1898b ("USB: gadget: u_f: add overflow checks to VLA macros")
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Brooke Basile <brookebasile@gmail.com>
Cc: stable <stable@kernel.org>
Link: https://lore.kernel.org/r/20200826192119.56450-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/u_f.h