Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
ALSA: usb-audio: scarlett2: Use struct_size() helper in scarlett2_usb()
Make use of the struct_size() helper instead of an open-coded version, in order to avoid any potential type mistakes or integer overflows that, in the worst scenario, could lead to heap overflows. Also, address the following sparse warnings: sound/usb/mixer_scarlett_gen2.c:1064:28: warning: using sizeof on a flexible structure sound/usb/mixer_scarlett_gen2.c:1065:29: warning: using sizeof on a flexible structure Link: KSPP#160 Link: KSPP#174 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
- Loading branch information